To test:
1 - Place a hold for pickup at a different branch than you are signed in at on an item owned by current branch
2 - Check in the item
3 - Confirm the transfer
4 - Check the branchtransfers table and note the reason is 'Reserve'
5 - Set the preference CanMarkHoldsToPullAsLost to allow
6 - Place a hold on an item at branch you are singed in at
7 - Ensure you are not using strict sql modes (bug 22431)
8 - Go to Circulation->Holds to pull
9 - Mark hold as lost
10 - Check branchtransfers and confirm reason is "LostReserve"
11 - Check in item from step 1 at the correct branch
12 - Go to Circulation->Holds awaiting pickup
13 - Cancel the reserve
14 - Check branchtransfers and confirm reason is "CancelReserve"
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4::Items::ModItemTransfer(
$itemnumber,
$item->holdingbranch,
- $checkreserves->{'branchcode'}
+ $checkreserves->{'branchcode'},
+ 'Reserve'
),
;
}
}
$hold->cancel;
if ( $item->homebranch ne $item->holdingbranch ) {
- C4::Items::ModItemTransfer( $item->itemnumber, $item->holdingbranch, $item->homebranch );
+ C4::Items::ModItemTransfer( $item->itemnumber, $item->holdingbranch, $item->homebranch, 'LostReserve' );
}
if ( my $yaml = C4::Context->preference('UpdateItemWhenLostFromHoldList') ) {
# if the document is not in his homebranch location and there is not reservation after, we transfer it
if ($transfer && !$nextreservinfo) {
- ModItemTransfer( $item, $fbr, $tbr );
+ ModItemTransfer( $item, $fbr, $tbr, 'CancelReserve' );
}
# if we have a result
if ($nextreservinfo) {