Summary: | $hold->fill does not set itemnumber when checking out without confirming hold | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Hold requests | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33792 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.07
|
|
Circulation function: | |||
Bug Depends on: | 29869 | ||
Bug Blocks: | |||
Attachments: |
Bug 33791: Pass itemnumber to $hold->fill
Bug 33791: Add unit test Bug 33791: Pass itemnumber to $hold->fill Bug 33791: Add unit test Bug 33791: Pass itemnumber to $hold->fill Bug 33791: Add unit test Bug 33791: Pass itemnumber to $hold->fill Bug 33791: (QA follow-up) Stick to 'item_id' for the parameter name |
Description
Marcel de Rooy
2023-05-22 09:54:50 UTC
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? Created attachment 151507 [details] [review] 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> Created attachment 151508 [details] [review] 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> Created attachment 151509 [details] [review] 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> Created attachment 151524 [details] [review] 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> Created attachment 151525 [details] [review] 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> Created attachment 151526 [details] [review] 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> Created attachment 151527 [details] [review] 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> Looks like Kyle and I both PQA'd on this one simultaneously.. lol.. it's certainly PQA anyways. Created attachment 151539 [details] [review] Bug 33791: (QA follow-up) Stick to 'item_id' for the parameter name Pushed to master for 23.05. Nice work everyone, thanks! Nice work everyone! Pushed to stable for 22.11.x |