[Bug 24620] New: Existing transfers not closed when hold is set to waiting
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Bug ID: 24620 Summary: Existing transfers not closed when hold is set to waiting Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: nick@bywatersolutions.com Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 98678 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98678&action=edit Bug 24620: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 98679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98679&action=edit Bug 24620: Close existing transfers when setting item to waiting This patch adds a clause in ModReserveAffect to check if there are existing transfers and close them when setting a hold to waiting To test: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting 9 - Apply patch 10 - Delete hold and repeat 11 - Confirm that transfer is closed when hold marked waiting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98679|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 98711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98711&action=edit Bug 24620: Close existing transfers when setting item to waiting This patch adds a clause in ModReserveAffect to check if there are existing transfers and close them when setting a hold to waiting To test: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting 9 - Apply patch 10 - Delete hold and repeat 11 - Confirm that transfer is closed when hold marked waiting Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98711|0 |1 is obsolete| | --- Comment #4 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 98805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98805&action=edit Bug 24620: Close existing transfers when setting item to waiting This patch adds a clause in ModReserveAffect to check if there are existing transfers and close them when setting a hold to waiting To test: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting 9 - Apply patch 10 - Delete hold and repeat 11 - Confirm that transfer is closed when hold marked waiting Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, did not you forget to remove the existing call to _koha_notify_reserve 2 lines before? now we have: 1140 _koha_notify_reserve( $hold->reserve_id ) 1141 if ( !$transferToDo && !$already_on_shelf ); 1142 1143 if( !$transferToDo ){ 1144 _koha_notify_reserve( $hold->reserve_id ) unless $already_on_shelf; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Also: 1. ->store not needed on ->build_object 2. DateTime->now should not be used directly (or add arguments) 3. Tests are failing: t/db_dependent//Circulation.t .. 45/47 # Looks like you planned 4 tests but ran 1. # Failed test 'Filling a hold should cancel existing transfer' # at t/db_dependent//Circulation.t line 3783. Can't use string ("ZSpzGDUl") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Reserves.pm line 175. # Looks like your test exited with 255 just after 47. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 100448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100448&action=edit Bug 24620: Remove original call to notify reserve -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100448|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 100451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100451&action=edit Bug 24620: Fix test, remove replaced code, use dt_from_string -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What if branchtransfers.tobranch is not the logged in user's library? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #9)
What if branchtransfers.tobranch is not the logged in user's library?
Then $transferToDo should be true and the code should not be called -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Nick Clemens from comment #10)
(In reply to Jonathan Druart from comment #9)
What if branchtransfers.tobranch is not the logged in user's library?
Then $transferToDo should be true and the code should not be called
circ/branchtransfers.pl 102 ModReserveAffect( $item, $borrowernumber ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24839 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24839 [Bug 24839] branchtransfers does not deal with holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Blocks| |22160 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22160 [Bug 22160] OMNIBUS: Transfers enhancements -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #11)
(In reply to Nick Clemens from comment #10)
(In reply to Jonathan Druart from comment #9)
What if branchtransfers.tobranch is not the logged in user's library?
Then $transferToDo should be true and the code should not be called
circ/branchtransfers.pl 102 ModReserveAffect( $item, $borrowernumber );
see bug 24839 - that code is intended to allow the transfer of a waiting hold - so cancelling when setting to waiting doesn't affect that workflow (that workflow may be problematic on its own) - the hold is set waiting, active transfers closed, then a new transfer generated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=24620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98678|0 |1 is obsolete| | Attachment #98805|0 |1 is obsolete| | Attachment #100451|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102914&action=edit Bug 24620: Unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102915&action=edit Bug 24620: Close existing transfers when setting item to waiting This patch adds a clause in ModReserveAffect to check if there are existing transfers and close them when setting a hold to waiting To test: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting 9 - Apply patch 10 - Delete hold and repeat 11 - Confirm that transfer is closed when hold marked waiting Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102916&action=edit Bug 24620: Fix test, remove replaced code, use dt_from_string Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #17 from Joy Nelson <joy@bywatersolutions.com> --- doesn't apply to 19.11.x not backported -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 104437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104437&action=edit Bug 24620: [19.11.x] Close existing transfer when hold set to waiting (squashed) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Bug 24620: Close existing transfers when setting item to waiting This patch adds a clause in ModReserveAffect to check if there are existing transfers and close them when setting a hold to waiting To test: 1 - Set AutomaticItemReturn to Do 2 - Checkin an item from Library B at Library A 3 - Confirm item is in transfer (check the details page) 4 - Place a item level hold for pickup at library A 5 - Checkin the item at Library A 6 - Confirm the hold 7 - View the details page 8 - Note the item is in transit and waiting 9 - Apply patch 10 - Delete hold and repeat 11 - Confirm that transfer is closed when hold marked waiting Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Bug 24620: Fix test, remove replaced code, use dt_from_string Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | --- Comment #19 from Joy Nelson <joy@bywatersolutions.com> --- Thanks for the rebase - backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies for 19.05.x no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 14170 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14170 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14170 [Bug 14170] branchtransfers items need to be cancelled when on loan or a waiting reserve -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org