Bugzilla – Attachment 126219 Details for
Bug 28445
Use the task queue for the batch delete and update items tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view
Bug-28445-Respect-MaxItemsToDisplayForBatchMod-fro.patch (text/plain), 2.52 KB, created by
Jonathan Druart
on 2021-10-13 15:27:51 UTC
(
hide
)
Description:
Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-13 15:27:51 UTC
Size:
2.52 KB
patch
obsolete
>From bc23cd1bbf119ba3d205cdda9ecb2083dc7e7157 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 13 Oct 2021 17:27:23 +0200 >Subject: [PATCH] Bug 28445: Respect MaxItemsToDisplayForBatchMod from job > detail view > >--- > Koha/BackgroundJob/BatchUpdateItem.pm | 20 +++++++++++-------- > .../batch_item_record_modification.inc | 6 +++++- > 2 files changed, 17 insertions(+), 9 deletions(-) > >diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm >index 8336b16e23e..6c7246e2404 100644 >--- a/Koha/BackgroundJob/BatchUpdateItem.pm >+++ b/Koha/BackgroundJob/BatchUpdateItem.pm >@@ -177,14 +177,18 @@ sub additional_report { > my $job = Koha::BackgroundJobs->find( $args->{job_id} ); > > my $itemnumbers = $job->report->{modified_itemnumbers}; >- my $items_table = >- Koha::UI::Table::Builder::Items->new( { itemnumbers => $itemnumbers } ) >- ->build_table; >- >- return { >- items => $items_table->{items}, >- item_header_loop => $items_table->{headers}, >- }; >+ if ( scalar(@$itemnumbers) > C4::Context->preference('MaxItemsToDisplayForBatchMod') ) { >+ return { too_many_items_display => 1 }; >+ } else { >+ my $items_table = >+ Koha::UI::Table::Builder::Items->new( { itemnumbers => $itemnumbers } ) >+ ->build_table; >+ >+ return { >+ items => $items_table->{items}, >+ item_header_loop => $items_table->{headers}, >+ }; >+ } > } > > 1; >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 cbefbbe4163..4d4fed19fb9 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 >@@ -1,3 +1,5 @@ >+[% USE Koha %] >+ > [% BLOCK report %] > [% SET report = job.report %] > [% IF report %] >@@ -30,7 +32,9 @@ > </div> > [% END %] > >- [% IF items.size %] >+ [% IF too_many_items_display %] >+ <p>Too many items ([% too_many_items_display | html %]): You have edited more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.</p> >+ [% ELSIF items.size %] > [% PROCESS items_table_batchmod headers => item_header_loop, items => items, display_columns_selection => 1 %] > [% END %] > [% END %] >-- >2.25.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 28445
:
121372
|
123221
|
123222
|
123223
|
123224
|
123225
|
123226
|
123227
|
123228
|
123229
|
123239
|
123240
|
125801
|
125802
|
125803
|
125804
|
125805
|
125808
|
125810
|
125811
|
125812
|
125817
|
125865
|
126046
|
126047
|
126136
|
126137
|
126138
|
126139
|
126140
|
126141
|
126142
|
126217
|
126218
|
126219
|
126223
|
126328
|
126329
|
126330
|
126331
|
126332
|
126333
|
126334
|
126335
|
126336
|
126337
|
126338
|
126339
|
126352
|
126353
|
126354
|
126355
|
126356
|
126357
|
126358
|
126359
|
126360
|
126361
|
126362
|
126363
|
126364
|
126365
|
126366
|
126367
|
126374
|
126375
|
126376
|
126377
|
126378
|
126379
|
126380
|
126381
|
126382
|
126383
|
126384
|
126385
|
126386
|
126387
|
126388
|
126389
|
127033
|
127037
|
127038
|
127039
|
128007
|
128008
|
128009