[Bug 33791] New: $hold->fill does not set itemnumber when checking out without confirming hold
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Bug ID: 33791 Summary: $hold->fill does not set itemnumber when checking out without confirming hold Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If you add a hold on a book (next available), and then checkout an item of this book to the same patron, the hold is filled but without itemnumber. Since we normally expect an itemnumber in old_reserves, this may be confusing. For instance, reserve_stats.pl ignores these holds because it filters on itemnumber. Is this simply a bug or are there circumstances that this behavior is preferred? In other words, should we fix reserve_stats.pl and other code that assumes the itemnumber or should we fix MoveReserve/$hold->fill ? -- 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=33791 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Interestingly, CheckReserves puts the given itemnumber (from the checkout) into its highest reserve of the result: $highest->{'itemnumber'} = $item->itemnumber; But MoveReserves does ignore it in the $res (==$highest) hash: if ($res->{borrowernumber} == $borrowernumber) { my $hold = Koha::Holds->find( $res->{reserve_id} ); $hold->fill; So it may have worked, and was perhaps undone by refactoring? -- 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=33791 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 151507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151507&action=edit Bug 33791: Pass itemnumber to $hold->fill Test plan: Without this patch: Place next available level on some book for patron A. Checkout this book directly to patron A. Check old_reserves table for this reserve; does not have itemnumber. With this patch: Do the same. In old_reserves the itemnumber should be saved. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=33791 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- 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=33791 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=33791 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 151508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151508&action=edit Bug 33791: Add unit test Test plan: Run t/db_dependent/Koha/Hold.t NOTE: This test should fail without following patch, but pass with it. 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=33791 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151507|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 151509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151509&action=edit Bug 33791: Pass itemnumber to $hold->fill Test plan: Without this patch: Place next available level on some book for patron A. Checkout this book directly to patron A. Check old_reserves table for this reserve; does not have itemnumber. With this patch: Do the same. In old_reserves the itemnumber should be saved. Run again t/db_dependent/Koha/Hold.t. Should pass. 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=33791 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33792 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151508|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 151524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151524&action=edit Bug 33791: Add unit test Test plan: Run t/db_dependent/Koha/Hold.t NOTE: This test should fail without following patch, but pass with it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=33791 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151509|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 151525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151525&action=edit Bug 33791: Pass itemnumber to $hold->fill Test plan: Without this patch: Place next available level on some book for patron A. Checkout this book directly to patron A. Check old_reserves table for this reserve; does not have itemnumber. With this patch: Do the same. In old_reserves the itemnumber should be saved. Run again t/db_dependent/Koha/Hold.t. Should pass. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=33791 Kyle M Hall <kyle@bywatersolutions.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=33791 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151524|0 |1 is obsolete| | Attachment #151525|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 151526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151526&action=edit Bug 33791: Add unit test Test plan: Run t/db_dependent/Koha/Hold.t NOTE: This test should fail without following patch, but pass with it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=33791 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 151527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151527&action=edit Bug 33791: Pass itemnumber to $hold->fill Test plan: Without this patch: Place next available level on some book for patron A. Checkout this book directly to patron A. Check old_reserves table for this reserve; does not have itemnumber. With this patch: Do the same. In old_reserves the itemnumber should be saved. Run again t/db_dependent/Koha/Hold.t. Should pass. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=33791 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com 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=33791 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks like Kyle and I both PQA'd on this one simultaneously.. lol.. it's certainly PQA anyways. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29869 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29869 [Bug 29869] Add Koha::Hold->fill -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 151539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151539&action=edit Bug 33791: (QA follow-up) Stick to 'item_id' for the parameter name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.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=33791 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.07 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Bug 33791 depends on bug 29869, which changed state. Bug 29869 Summary: Add Koha::Hold->fill https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29869 What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33791 Bug 33791 depends on bug 29869, which changed state. Bug 29869 Summary: Add Koha::Hold->fill https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29869 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org