Bugzilla – Attachment 193367 Details for
Bug 41884
Job report for batch item modifications that fail due to PreventWithdrawingItemsStatus has no details on failed items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41884: Add better reporting when item fails to modify via batch mod
Bug-41884-Add-better-reporting-when-item-fails-to-.patch (text/plain), 3.11 KB, created by
Lucas Gass (lukeg)
on 2026-02-18 21:55:57 UTC
(
hide
)
Description:
Bug 41884: Add better reporting when item fails to modify via batch mod
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-02-18 21:55:57 UTC
Size:
3.11 KB
patch
obsolete
>From 39426c25f2540eb20fb22e6cf671e4afc444cd06 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 18 Feb 2026 21:51:47 +0000 >Subject: [PATCH] Bug 41884: Add better reporting when item fails to modify via > batch mod > >To test: >1. Search for the system preference, PreventWithDrawingItemsStatus >2. Select both in transit and checked out, then save >3. Find an item and put it in transit. >4. Try to batch modify the item, making it withdrawen. >5. View the details of job, you should see 1 item could not be modified. >6. APPLY PATCH, restart_all >7. Try the steps again, this time when you get to the details of the job you should see more information on the item that failed: > > 1 item could not be modified. > 39999000001457 : Item is in transit > >8. Repeat this steps with a a checkout out item. >9. Also try with multiple items that will fail, ensure the display looks good. >--- > Koha/Items.pm | 4 +++- > .../batch_item_record_modification.inc | 14 ++++++++++++++ > 2 files changed, 17 insertions(+), 1 deletion(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index 862631fbfb3..90525e2f33f 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -584,7 +584,9 @@ sub batch_update { > ) > } catch { > push @errors, { >- error => eval { $_->{error} } || "$_", >+ itemnumber => $item->itemnumber, >+ barcode => $item->barcode, >+ error => eval { $_->message } || eval { $_->error } || "$_", > }; > warn $_ > }; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_item_record_modification.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_item_record_modification.inc >index ba400992a23..a889154774e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_item_record_modification.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_item_record_modification.inc >@@ -23,6 +23,20 @@ > <div class="alert alert-warning"> > [% SET error_items_count = report.errors.size %] > <span>[% tnx('{count} item could not be modified.', '{count} items could not be modified.', error_items_count, { count = error_items_count }) | html %]</span> >+ <ul> >+ [% FOR error IN report.errors %] >+ <li> >+ [% error.barcode | html %] >+ [% IF error.error == 'intransit_cannot_withdraw' %] >+ : [% t('Item is in transit') | html %] >+ [% ELSIF error.error == 'onloan_cannot_withdraw' %] >+ : [% t('Item is checked out') | html %] >+ [% ELSE %] >+ : [% error.error | html %] >+ [% END %] >+ </li> >+ [% END %] >+ </ul> > </div> > [% END %] > </div> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41884
:
193367
|
193596