Bug 39820: Cancel holds with cancellation requests via SIP
To test: 1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests. 2. Add a hold for a patron and create a hold cancellation request. 3. Check the item in via SIP, I used the SIP emulator: kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310 4. The hold remains. 5. APPLY PATCH, restart_all 6. Try 2 - 4 again, the hold should be cancelled Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e9481a678c
commit
2246bfbb4a
|
|
@ -91,6 +91,12 @@ sub do_checkin {
|
|||
my ( $return, $messages, $issue, $borrower );
|
||||
|
||||
my $item = Koha::Items->find( { barcode => $barcode } );
|
||||
if ($item) {
|
||||
my $waiting_holds_to_be_cancelled = $item->holds->waiting->filter_by_has_cancellation_requests;
|
||||
while ( my $hold = $waiting_holds_to_be_cancelled->next ) {
|
||||
$hold->cancel;
|
||||
}
|
||||
}
|
||||
|
||||
my $human_required = 0;
|
||||
if ( C4::Context->preference("CircConfirmItemParts")
|
||||
|
|
|
|||
Loading…
Reference in New Issue