Bugzilla – Attachment 182218 Details for
Bug 23010
If an item is checked out or in transit it should not be able to be marked withdrawn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23010: Report on count of items not modified via batchMod
Bug-23010-Report-on-count-of-items-not-modified-vi.patch (text/plain), 3.13 KB, created by
Emily Lamancusa (emlam)
on 2025-05-09 17:50:42 UTC
(
hide
)
Description:
Bug 23010: Report on count of items not modified via batchMod
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-05-09 17:50:42 UTC
Size:
3.13 KB
patch
obsolete
>From 9bfa58830eecd65ac185a10a95b60787536e2375 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 23 Apr 2025 22:40:09 +0000 >Subject: [PATCH] Bug 23010: Report on count of items not modified via batchMod > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > Koha/BackgroundJob/BatchUpdateItem.pm | 2 +- > Koha/Items.pm | 9 ++++++++- > .../background_jobs/batch_item_record_modification.inc | 7 +++++++ > 3 files changed, 16 insertions(+), 2 deletions(-) > >diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm >index 1158efd568..75250d6877 100644 >--- a/Koha/BackgroundJob/BatchUpdateItem.pm >+++ b/Koha/BackgroundJob/BatchUpdateItem.pm >@@ -113,6 +113,7 @@ sub process { > callback => sub { $self->step; }, > } > ); >+ $report->{errors} = $results->{errors}; > $report->{modified_itemnumbers} = $results->{modified_itemnumbers}; > $report->{modified_fields} = $results->{modified_fields}; > } catch { >@@ -123,7 +124,6 @@ sub process { > > my $data = $self->decoded_data; > $data->{report} = $report; >- > $self->finish($data); > } > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index edf66466ff..5ed3b6c688 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -317,6 +317,7 @@ sub batch_update { > > my ( @modified_itemnumbers, $modified_fields ); > my $i; >+ my @errors; > my $schema = Koha::Database->new->schema; > while ( my $item = $self->next ) { > >@@ -436,6 +437,9 @@ sub batch_update { > } > ) > } catch { >+ push @errors, { >+ error => eval { $_->{error} } || "$_", >+ }; > warn $_ > }; > >@@ -458,7 +462,10 @@ sub batch_update { > } > } > >- return ( { modified_itemnumbers => \@modified_itemnumbers, modified_fields => $modified_fields }, $self ); >+ return ( >+ { modified_itemnumbers => \@modified_itemnumbers, modified_fields => $modified_fields, errors => \@errors }, >+ $self >+ ); > } > > =head2 apply_regex >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 ee3d09f25e..1ee3fd72cb 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 >@@ -13,6 +13,13 @@ > [% IF job.status == 'cancelled' %]<span>The job has been cancelled before it finished.</span>[% END %] > <a href="/cgi-bin/koha/tools/batchMod.pl" title="New batch item modification">New batch item modification</a> > </div> >+ <div> >+ [% IF report.errors.size %] >+ <div class="alert alert-warning"> >+ <span>[% report.errors.size | html %] item(s) could not be modified.</span> >+ </div> >+ [% END %] >+ </div> > [% END %] > [% END %] > >-- >2.34.1
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 23010
:
176241
|
177299
|
177402
|
177413
|
177434
|
177435
|
177436
|
177437
|
177451
|
177452
|
177453
|
177454
|
177911
|
177912
|
177913
|
177914
|
178808
|
181322
|
181323
|
181324
|
181325
|
181326
|
181327
|
181400
|
182124
|
182129
|
182130
|
182131
|
182201
|
182212
|
182213
|
182214
|
182215
|
182216
|
182217
| 182218 |
182219
|
182220
|
182221
|
182222
|
182223
|
182224