Browse Source

Bug 29790: Restore warning if deletion of serial item fails

If the deletion of a serial item failed, the UI did not provide a warning/error message.

Test plan:
0. Create a new subscription with "Create an item record when receiving
this serial"
1. Receive a new item, set a barcode
2. Check it out
3. Select the item you have received in the serial item list (page
"Serial collection information") and click "Delete selected issues"
4. Tick "Delete the associated items" and confirm the deletion
=> Without this patch the deletion fail but the UI does not warn it
=> With this patch applied you see a warning "one or more associated
items could not be deleted at this time."

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Jonathan Druart 3 weeks ago
committed by Fridolin Somers
parent
commit
381898d8ca
  1. 4
      serials/serials-collection.pl

4
serials/serials-collection.pl

@ -123,9 +123,9 @@ if($op eq 'delete_confirm'){
}
my $items = Koha::Items->search({ itemnumber => \@itemnumbers });
while ( my $item = $items->next ) {
my $error = $item->safe_delete;
my $deleted = $item->safe_delete;
$template->param(error_delitem => 1)
if $error eq '1';
unless $deleted;
}
}
for my $serialid (@serialsid){

Loading…
Cancel
Save