Bugzilla – Attachment 115988 Details for
Bug 26298
If MaxItemsToProcessForBatchMod is set to 1000, the max is actually 999
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26298: Don't set too_many_items_to_process if equal to limit
Bug-26298-Dont-set-toomanyitemstoprocess-if-equal-.patch (text/plain), 1.97 KB, created by
Nick Clemens (kidclamp)
on 2021-01-28 19:00:09 UTC
(
hide
)
Description:
Bug 26298: Don't set too_many_items_to_process if equal to limit
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-01-28 19:00:09 UTC
Size:
1.97 KB
patch
obsolete
>From bfb6237df323af413567dde4d1c283a7b7b507a7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 28 Jan 2021 18:56:39 +0000 >Subject: [PATCH] Bug 26298: Don't set too_many_items_to_process if equal to > limit > >In the code we prepare items for display if less than or equal to the pref, but we don't allow >the edit if greater than or equal to the pref. The second case should be only 'greater than' > >To test: > 1- Set MaxItemsToProcessForBatchMod to 1000 > 2- Go to Reports > 3- Make a report for itemnumbers that will give you at least 1000 items (ex. SELECT itemnumber FROM items) > 4- Save and run the report > 5- In "Rows per page", choose 1000 > 6- Click on "Batch operations with 1000 visible records" > Batch item modification > 7- Notice that the item modification form isn't there and that the message says "Too many items (1000): You are not allowed to edit more than 1000 items in a batch." > 8- Apply patch > 9- Restart all the things >10- Run the report again and display 1000 rows >11- Click on "Batch operations with 1000 visible records" > Batch item modification >12 - Sucess! >--- > tools/batchMod.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index dca2e41ad4..53181f5b6e 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -415,7 +415,7 @@ if ($op eq "show"){ > my $max_display_items = $del > ? C4::Context->preference("MaxItemsToDisplayForBatchDel") > : C4::Context->preference("MaxItemsToDisplayForBatchMod"); >- $template->param("too_many_items_process" => scalar(@itemnumbers)) if !$del && scalar(@itemnumbers) >= C4::Context->preference("MaxItemsToProcessForBatchMod"); >+ $template->param("too_many_items_process" => scalar(@itemnumbers)) if !$del && scalar(@itemnumbers) > C4::Context->preference("MaxItemsToProcessForBatchMod"); > if (scalar(@itemnumbers) <= ( $max_display_items // 1000 ) ) { > $items_display_hashref=BuildItemsData(@itemnumbers); > } else { >-- >2.11.0
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 26298
:
115988
|
115994
|
116018