Bugzilla – Attachment 160776 Details for
Bug 34972
Canceling a waiting hold from the holds over tab can make the next hold unfillable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34972: GetOtherReserves should not alter hold states
Bug-34972-GetOtherReserves-should-not-alter-hold-s.patch (text/plain), 4.64 KB, created by
Emily Lamancusa (emlam)
on 2024-01-10 16:34:04 UTC
(
hide
)
Description:
Bug 34972: GetOtherReserves should not alter hold states
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-01-10 16:34:04 UTC
Size:
4.64 KB
patch
obsolete
>From 8b30a187b02bc6d64056895c080286f2c0cb9cb0 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 10 Jan 2024 10:44:39 -0500 >Subject: [PATCH] Bug 34972: GetOtherReserves should not alter hold states > >GetOtherReserves attempts to set the waiting/transit status for the next >hold on the list when applicable, but in practice it either leaves the >hold state unchanged, or sets the itemnumber without setting the found >status (erroneously converting bib-level holds to item-level holds). > >The latter situation only occurs when the user has been prompted to >confirm, cancel, or revert the hold, and is able to ignore the prompt. >In those situations, the hold's state should not change. > >GetOtherReserves does not need to change the hold's state, and >attempting to do so produces no effect except for erroneously converting >bib-level holds to item-level holds in certain situations, so this patch >removes that code. > >To test: >1. Place 2 bib-level holds for 2 different patrons (Patron A and Patron > B) on the same record, both for pickup at the logged-in library >2. Check in an item from that record to fill Patron A's hold >3. Set the hold's expiration date to yesterday by accessing the database > in the command line: > - In a ktd shell prompt, open the db client with koha-mysql kohadev > - UPDATE reserves > SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY) > WHERE borrowernumber = <Patron A's borrowernumber> >4. Go to Circulation > Holds Awaiting Pickup, and find the hold in the > "holds waiting past their expiration date" tab >5. Click the "Cancel hold" button in the Actions column next to the hold >6. Return to the bib record and look at Patron B's hold >--> Note that Patron B's hold is now an item-level hold and does not > have a waiting status > >7. Cancel Patron B's hold >8. Place 2 new holds on the record: one for Patron A at the logged-in > library, and one for Patron B at a different library >9. Check in an item to fill Patron A's hold >10. Repeat steps 3-5 to expire and cancel Patron A's hold >11. Return to the bib record and look at Patron B's hold >--> Note that Patron B's hold is now an item-level hold and does not > have a transit status > >12. Place 2 bib-level holds for 2 different patrons (Patron A and Patron > B) on the same record, both for pickup at the logged-in library >13. Check in an item from that record to fill Patron A's hold >14. Check in the same item again. A modal will pop up, saying that the > hold is already waiting >15. In the modal, choose a cancellation reason and click "Cancel hold" >--> A new modal will pop up to fill Patron B's hold >16. Click "Ignore" on the modal for Patron B's hold >17. Return to the bib record and look at Patron B's hold >--> Note that Patron B's hold is now an item-level hold and does not > have a waiting status > >18. Apply patch >19. Repeat steps 1-6 >--> Note that Patron B's hold is still a bib-level/"next available" hold >20. Repeat steps 7-11 >--> Note that Patron B's hold is still a bib-level/"next available" hold >21. Repeat steps 12-17 >--> Note that Patron B's hold is still a bib-level/"next available" hold >--- > C4/Reserves.pm | 23 +++-------------------- > 1 file changed, 3 insertions(+), 20 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index c95a3d7ad4..7abf211e87 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -729,32 +729,15 @@ sub GetOtherReserves { > my $item = Koha::Items->find($itemnumber); > my ( undef, $checkreserves, undef ) = CheckReserves($item); > if ($checkreserves) { >+ >+ #step 2a : case of a reservation at a different branch, return 'transfert' message > if ( $item->holdingbranch ne $checkreserves->{'branchcode'} ) { > $messages->{'transfert'} = $checkreserves->{'branchcode'}; >- #minus priorities of others reservs >- ModReserveMinusPriority( >- $itemnumber, >- $checkreserves->{'reserve_id'}, >- ); >- >- #launch the subroutine dotransfer >- C4::Items::ModItemTransfer( >- $itemnumber, >- $item->holdingbranch, >- $checkreserves->{'branchcode'}, >- 'Reserve' >- ), >- ; > } > >- #step 2b : case of a reservation on the same branch, set the waiting status >+ #step 2b : case of a reservation on the same branch, return 'waiting' message > else { > $messages->{'waiting'} = 1; >- ModReserveMinusPriority( >- $itemnumber, >- $checkreserves->{'reserve_id'}, >- ); >- ModReserveStatus($itemnumber,'W'); > } > > $nextreservinfo = $checkreserves; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34972
:
160775
|
160776
|
163471
|
163472
|
163473
|
163728
|
163729
|
163730
|
164392
|
164393
|
166024
|
166028
|
166029
|
166100
|
166101
|
166102
|
166103