[Bug 19832] New: SIP checkout removes extra hold on same biblio
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Bug ID: 19832 Summary: SIP checkout removes extra hold on same biblio Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: boutrosboutrosboutros@gmail.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com C4/SIP/ILS/Transaction/Checkout.pm includes the following bit of code which remove any hold that that matches the biblio and bilbionumber in checkout: # Fill any reserves the patron had on the item. # TODO: this logic should be pulled internal to AddIssue for all Koha. $debug and warn "pending_queue: " . (@$pending) ? Dumper($pending) : '[]'; foreach (grep {$_->{borrowernumber} eq $self->{patron}->{borrowernumber}} @$pending) { $debug and warn "Filling reserve (borrowernumber,biblionumber,reservedate): " . sprintf("(%s,%s,%s)\n",$_->{borrowernumber},$_->{biblionumber},$_->{reservedate}); ModReserveFill($_); # TODO: adjust representation in $self->item } As far as I can tell, this code is completely unnecessary, since C4::Circulation::AddIssue allread calls C4::Reserves::MoveReserve which fullfills the hold. What's more, if the borrower has multiple holds on the same biblio, all of them will be removed. This is clearly wrong. I purpose to remove the code above, unless someone can explain why SIP checkout should behave different than normal checkout in this case. -- 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=19832 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- 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=19832 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #1 from Liz Rea <liz@catalyst.net.nz> --- This is clearly wrong, I have a library having this exact problem right now. Will give your solution a go and see what happens. Cheers, Liz -- 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=19832 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- 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=19832 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 84070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84070&action=edit Bug 19832: Unit tests -- 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=19832 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 84071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84071&action=edit Bug 19832: Don't fill holds in SIP/Transaction/Checkout.pm AddIssue already checks for holds in the item being issued and deals with them The sip code, additionally, does not consider that multiple holds per bib is allowed To test: 0 - Apply only first patch (unit tests) 1 - Place two holds for a patron on a bib 2 - Checkout that item via sip_cli_emulator 3 - Note all holds are cancelled/filled 4 - prove -v t/db_dependent/SIP/Transaction.t 5 - it fails 6 - Apply second patch 7 - prove tests, all green 8 - Place two holds on a single bib for one patron again 9 - Checkout the item via sip_cli_emulator 10 - Only one holds is filled -- 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=19832 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- 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=19832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84070|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 84180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84180&action=edit Bug 19832: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84071|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 84181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84181&action=edit Bug 19832: Don't fill holds in SIP/Transaction/Checkout.pm AddIssue already checks for holds in the item being issued and deals with them The sip code, additionally, does not consider that multiple holds per bib is allowed To test: 0 - Apply only first patch (unit tests) 1 - Place two holds for a patron on a bib 2 - Checkout that item via sip_cli_emulator 3 - Note all holds are cancelled/filled 4 - prove -v t/db_dependent/SIP/Transaction.t 5 - it fails 6 - Apply second patch 7 - prove tests, all green 8 - Place two holds on a single bib for one patron again 9 - Checkout the item via sip_cli_emulator 10 - Only one holds is filled Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Code seems sound and passes tests. Signing Off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=19832 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84180|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 85149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85149&action=edit Bug 19832: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: maxissueqty => 10. Replaced dot by comma. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84181|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 85150 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85150&action=edit Bug 19832: Don't fill holds in SIP/Transaction/Checkout.pm AddIssue already checks for holds in the item being issued and deals with them The sip code, additionally, does not consider that multiple holds per bib is allowed To test: 0 - Apply only first patch (unit tests) 1 - Place two holds for a patron on a bib 2 - Checkout that item via sip_cli_emulator 3 - Note all holds are cancelled/filled 4 - prove -v t/db_dependent/SIP/Transaction.t 5 - it fails 6 - Apply second patch 7 - prove tests, all green 8 - Place two holds on a single bib for one patron again 9 - Checkout the item via sip_cli_emulator 10 - Only one holds is filled Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 85151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85151&action=edit Bug 19832: (QA follow-up) Remove obsolete pending_queue call Only use of $pending was removed in the former patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Nick++ for unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.04 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org