[Bug 27209] New: Add Koha::Hold->set_pickup_location
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Bug ID: 27209 Summary: Add Koha::Hold->set_pickup_location Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org We need a clean and fully tested method to set a hold's pickup location. It should throw exceptions if: - No pickup location passed - The passed pickup location is not a valid one -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27205 Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27205 [Bug 27205] Hold routes are not dealing with invalid pickup locations -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114356&action=edit Bug 27209: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114357&action=edit Bug 27209: Add Koha::Hold->set_pickup_location This patch introduces a method to safely update a hold's pickup location. It will raise exceptionis if the passed parameters are invalid or absent. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS; Tests pass 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|27205 |18729 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18729 [Bug 18729] Librarian unable to update hold pickup library from patron pages without "modify_holds_priority" permission https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27205 [Bug 27205] Hold routes are not dealing with invalid pickup locations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114374&action=edit Bug 27209: (follow-up) Add ->is_pickup_location_valid This patch simply refactors the pickup location check into a method that can be called on its own. Tests are added, and the tests for ->set_pickup_location should pass unmodified. To test: 1. Apply the first two patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS: tests pass 3. Apply this refactoring patch 4. Notice the tests are similar, but check for boolean output 5. Repeat 2 => SUCCESS: New tests pass, set_pickup_location() behavior unchanged. 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27205 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27205 [Bug 27205] Hold routes are not dealing with invalid pickup locations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114356|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114378&action=edit Bug 27209: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114357|0 |1 is obsolete| | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114379 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114379&action=edit Bug 27209: Add Koha::Hold->set_pickup_location This patch introduces a method to safely update a hold's pickup location. It will raise exceptionis if the passed parameters are invalid or absent. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS; Tests pass 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114374|0 |1 is obsolete| | --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114380&action=edit Bug 27209: (follow-up) Add ->is_pickup_location_valid This patch simply refactors the pickup location check into a method that can be called on its own. Tests are added, and the tests for ->set_pickup_location should pass unmodified. To test: 1. Apply the first two patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS: tests pass 3. Apply this refactoring patch 4. Notice the tests are similar, but check for boolean output 5. Repeat 2 => SUCCESS: New tests pass, set_pickup_location() behavior unchanged. 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114378|0 |1 is obsolete| | Attachment #114379|0 |1 is obsolete| | Attachment #114380|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 114443 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114443&action=edit Bug 27209: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 114444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114444&action=edit Bug 27209: Add Koha::Hold->set_pickup_location This patch introduces a method to safely update a hold's pickup location. It will raise exceptionis if the passed parameters are invalid or absent. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS; Tests pass 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 114445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114445&action=edit Bug 27209: (follow-up) Add ->is_pickup_location_valid This patch simply refactors the pickup location check into a method that can be called on its own. Tests are added, and the tests for ->set_pickup_location should pass unmodified. To test: 1. Apply the first two patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS: tests pass 3. Apply this refactoring patch 4. Notice the tests are similar, but check for boolean output 5. Repeat 2 => SUCCESS: New tests pass, set_pickup_location() behavior unchanged. 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114443|0 |1 is obsolete| | --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 114448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114448&action=edit Bug 27209: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114444|0 |1 is obsolete| | --- Comment #11 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 114449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114449&action=edit Bug 27209: Add Koha::Hold->set_pickup_location This patch introduces a method to safely update a hold's pickup location. It will raise exceptionis if the passed parameters are invalid or absent. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS; Tests pass 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114445|0 |1 is obsolete| | --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 114450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114450&action=edit Bug 27209: (follow-up) Add ->is_pickup_location_valid This patch simply refactors the pickup location check into a method that can be called on its own. Tests are added, and the tests for ->set_pickup_location should pass unmodified. To test: 1. Apply the first two patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => SUCCESS: tests pass 3. Apply this refactoring patch 4. Notice the tests are similar, but check for boolean output 5. Repeat 2 => SUCCESS: New tests pass, set_pickup_location() behavior unchanged. 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.01 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Version(s)|21.05.00,20.11.01 |21.05.00,20.11.01,20.05.07 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 --- Comment #17 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Tried to backport to 19.11.x it because it's the dependency of a major bug (bug 27205) but the tests don't pass. Help needed here in order to backport bug 27205. kohadev-koha@6a2e5bab0d87:/kohadevbox/koha$ prove t/db_dependent/Koha/Hold.t t/db_dependent/Koha/Hold.t .. # No tests run! t/db_dependent/Koha/Hold.t .. 1/3 # Failed test 'No tests run for subtest "patron() tests"' # at t/db_dependent/Koha/Hold.t line 55. The method Koha::Hold->patron is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 661 Koha::Object::AUTOLOAD('Koha::Hold=HASH(0x556f6652aa00)') called at t/db_dependent/Koha/Hold.t line 50 main::__ANON__ at /usr/share/perl5/Test/Builder.pm line 310 eval {...} at /usr/share/perl5/Test/Builder.pm line 310 Test::Builder::subtest('Test::Builder=HASH(0x556f5d6558b0)', 'patron() tests', 'CODE(0x556f5d5c2918)') called at /usr/share/perl5/Test/More.pm line 807 Test::More::subtest('patron() tests', 'CODE(0x556f5d5c2918)') called at t/db_dependent/Koha/Hold.t line 55 # Looks like your test exited with 255 just after 1. t/db_dependent/Koha/Hold.t .. Dubious, test returned 255 (wstat 65280, 0xff00) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27209 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org