[Bug 20167] New: Item hold is set to bibliographic hold when changing pickup location
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Bug ID: 20167 Summary: Item hold is set to bibliographic hold when changing pickup location Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: stefan.berndtsson@ub.gu.se QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If a patron has an item level hold with pickup location set to library A and staff then (via the Holds tab in the patron view) changes pickup location to library B, itemnumber is lost from the hold. This is a definite problem when the items within a bibliographic record are different things (separate volumes for example). This can be fixed by adding some code in Koha/REST/V1/Hold.pm This bit before the ModReserve call: if($hold->itemnumber()) { $params->{itemnumber} = $hold->itemnumber(); } However, given the FIXME comment in C4/Reserves.pm for ModReserve, I'm wondering if this is the desired fix: "Note that the forgoing can have the effect of causing item-level hold requests to turn into title-level requests. This will be fixed once reserves has separate columns for requested itemnumber and supplying itemnumber." A different method of solving this issue could be to provide itemnumber as part of the pickup-location-change call instead and keep the rest of the REST-API and ModReserve the way it works now. I'm somewhat unfamiliar with the how the Mojolicious system works, so I haven't looked into that method yet. -- 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=20167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Severity|normal |major -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Stefan Berndtsson from comment #0)
If a patron has an item level hold with pickup location set to library A and staff then (via the Holds tab in the patron view) changes pickup location to library B, itemnumber is lost from the hold. This is a definite problem when the items within a bibliographic record are different things (separate volumes for example).
This can be fixed by adding some code in Koha/REST/V1/Hold.pm
This bit before the ModReserve call:
if($hold->itemnumber()) { $params->{itemnumber} = $hold->itemnumber(); }
However, given the FIXME comment in C4/Reserves.pm for ModReserve, I'm wondering if this is the desired fix: "Note that the forgoing can have the effect of causing item-level hold requests to turn into title-level requests. This will be fixed once reserves has separate columns for requested itemnumber and supplying itemnumber."
A different method of solving this issue could be to provide itemnumber as part of the pickup-location-change call instead and keep the rest of the REST-API and ModReserve the way it works now. I'm somewhat unfamiliar with the how the Mojolicious system works, so I haven't looked into that method yet.
I think your proposed solution is the right onw. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 72436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72436&action=edit Bug 20167: Regression test -- 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=20167 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 72437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72437&action=edit Bug 20167: Make changing a hold pass the itemnumber to ModReserve If you have an item-level hold, changing an attribute (like priority, pickup location or suspended until date) makes the hold a biblio-level hold, because ModReserve is not passed the current itemnumber. This patch uses the hold's itemnumber and passes it to the ModReserve call. To test: - Run the regression tests from the previous patch: $ kshell k$ prove t/db_dependent/api/v1/holds.t => FAIL: Tests fail - Apply this patch - Run the tests: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Claire Gravely <claire_gravely@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=20167 Claire Gravely <claire_gravely@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72436|0 |1 is obsolete| | Attachment #72437|0 |1 is obsolete| | --- Comment #4 from Claire Gravely <claire_gravely@hotmail.com> --- Created attachment 72479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72479&action=edit Bug 20167: Regression test Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 --- Comment #5 from Claire Gravely <claire_gravely@hotmail.com> --- Created attachment 72480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72480&action=edit Bug 20167: Make changing a hold pass the itemnumber to ModReserve If you have an item-level hold, changing an attribute (like priority, pickup location or suspended until date) makes the hold a biblio-level hold, because ModReserve is not passed the current itemnumber. This patch uses the hold's itemnumber and passes it to the ModReserve call. To test: - Run the regression tests from the previous patch: $ kshell k$ prove t/db_dependent/api/v1/holds.t => FAIL: Tests fail - Apply this patch - Run the tests: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Josef Moravec <josef.moravec@gmail.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=20167 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72479|0 |1 is obsolete| | Attachment #72480|0 |1 is obsolete| | --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 72534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72534&action=edit Bug 20167: Regression test Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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=20167 --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 72535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72535&action=edit Bug 20167: Make changing a hold pass the itemnumber to ModReserve If you have an item-level hold, changing an attribute (like priority, pickup location or suspended until date) makes the hold a biblio-level hold, because ModReserve is not passed the current itemnumber. This patch uses the hold's itemnumber and passes it to the ModReserve call. To test: - Run the regression tests from the previous patch: $ kshell k$ prove t/db_dependent/api/v1/holds.t => FAIL: Tests fail - Apply this patch - Run the tests: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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=20167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to master for 18.05, thanks to all for your hard work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to stable for 17.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20167 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for v17.05.10 I had to adapt since 17.05.x is still using C4::Reserves::GetReserve instead of Koha::Holds->find -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org