Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things
commite3175a4f28673fdc0ad333f0b638215d4a583560
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 May 2016 13:10:49 +0000 (11 14:10 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 17 Aug 2016 12:58:22 +0000 (17 14:58 +0200)
treeda0189ecd931110babba95fd4aa1c38425c7aa4d
parent970629b23acb46f8746ee2464158dbb8df7504d1
Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things

Prior to this patch, a single pref (MaxItemsForBatch) was used to
restrict the use of the batch item modification and deletion.

On the batch modification tool, the pref is used to limit the number of
items a librarian is allowed to modify in a batch, but on the batch
deletion tool the pref is used to limit the number of items to display.

To clarify things, this patch split the pref into 2 new prefs:
MaxItemsToDisplayForBatchDel and MaxItemsToProcessForBatchMod.

Later we could add a MaxItemsToProcessForBatchDel if needed.
Note that this patch should not introduce any changes in the current behaviors.

Test plan:
0/ Do not execute the update DB entry
1/ Set a value != 1000 for MaxItemsForBatch
2/ Execute the update DB entry and confirm that the 2 new prefs are
initially set with the value of MaxItemsForBatch and that
MaxItemsForBatch has been deleted
3/ Set different values for these 2 prefs (2 and 3 for instance to ease
the next steps)
4/ Try to delete less than MaxItemsToDisplayForBatchDel items
=> You must see the items details
5/ Try to delete more than MaxItemsToDisplayForBatchDel items
=> You must not see the items details but are allowed to delete them
6/ Try to modify less than MaxItemsToProcessForBatchMod items
=> You must see the items details
7/ Try to modify more than MaxItemsToProcessForBatchMod items
=> You must be restricted and not allowed to process

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b2c55ecdd7ad128c7ec923e70b13b1f287c7d00)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit bb5adfa7f959d80dd079b058ec67f0d3fc276d09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
tools/batchMod.pl