Bug 17758 - SIP checkin does not handle holds correctly
authorBenjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Tue, 13 Dec 2016 12:38:19 +0000 (13:38 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 12:34:02 +0000 (12:34 +0000)
This patch updates SIP checkin to use reserve_id as param, to fix regression
introduced by Bug 14695.

To test:

Given 1 patron and 1 biblio with two items attached:

1) create two record level holds on one biblio on same user
Using SIP client or telnet:
2) checkin item x on pickup branch, observe item is waiting and hold 1 is filled
3) checkin item y on pickup branch, observe item y now is waiting and x is available
4) apply this patch and repeat 1-3, now expected behaviour should be
   that both holds are filled and both items waiting

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/SIP/ILS/Transaction/Checkin.pm

index bc1c433..ad04a88 100644 (file)
@@ -100,12 +100,12 @@ sub do_checkin {
         if ($branch eq $messages->{ResFound}->{branchcode}) {
             $self->alert_type('01');
             ModReserveAffect( $messages->{ResFound}->{itemnumber},
-                $messages->{ResFound}->{borrowernumber}, 0);
+                $messages->{ResFound}->{borrowernumber}, 0, $messages->{ResFound}->{reserve_id});
 
         } else {
             $self->alert_type('02');
             ModReserveAffect( $messages->{ResFound}->{itemnumber},
-                $messages->{ResFound}->{borrowernumber}, 1);
+                $messages->{ResFound}->{borrowernumber}, 1, $messages->{ResFound}->{reserve_id});
             ModItemTransfer( $messages->{ResFound}->{itemnumber},
                 $branch,
                 $messages->{ResFound}->{branchcode}