From 9c9bd5702cf69f71ee2eae28e5539d389bd4f3a2 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 19 Jul 2017 08:06:56 -0700 Subject: [PATCH] Bug 18958 - If patron has multiple record level holds on one record transferring first hold causes next hold to become item level Imagine you have a record with 3 items, each item is held by LibraryA, LibraryB and LibraryC respectively. Now, a patron places to record level holds for pickup at LibraryD. When any of the items are checked in, that item is trapped to fill the first hold, but a side affect is that the next open hold because item level for the item that was just checked in! This is clearly incorrect and prevents the patron from placing more record level holds on the record. Test Plan: 1. Create and use a patron that can place multiple record level holds per record 2. Create a record with X items, each at a different library 3. Place X 'Next available' holds on the record for the patron using the 'Holds to place' box 4. Check in LibraryA's copy as LibraryA and confirm the hold 5. Revisit request.pl for the record, notice the next hold in line is now item-specific 6. Attempt to place another hold for your patron, notice that it requires an item-specific hold 7. Apply this patch 8. Repeat steps 1-4 9. Revisit request.pl for the record, notice the next hold in line has *not* become item-specific --- circ/returns.pl | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 26286e8..87e22cb 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -166,26 +166,6 @@ if ( $query->param('reserve_id') ) { # i.e., whether to apply waiting status ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id ); } -# check if we have other reserves for this document, if we have a return send the message of transfer - my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); - - my $patron = Koha::Patrons->find( $nextreservinfo ); - my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname; - if ( $messages->{'transfert'} ) { - $template->param( - itemtitle => $biblio->title, - itemnumber => $item->itemnumber, - itembiblionumber => $biblio->biblionumber, - iteminfo => $biblio->author, - name => $name, - borrowernumber => $borrowernumber, - borcnum => $patron->cardnumber, - borfirstname => $patron->firstname, - borsurname => $patron->surname, - borcategory => $patron->category->description, - diffbranch => 1, - ); - } } my $borrower; -- 2.10.2