Summary: | Add a MaxItemsToDisplayForBatchMod preference | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Tools | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | anne-claire.bernaudin, aspencatteam, bouzid.fergani, jean-manuel.broust, jonathan.druart, josef.moravec, martin.renvoize, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11490 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
When batch editing large amounts of items, displaying all of the info could lead to a timeout while waiting for page load. This enhancement adds the ability to define a MaxItemsToDisplayForBatchMod system preference which will hide the list of individual items and allow libraries to edit larger batches without hitting a timeout.
|
Version(s) released in: | |
Circulation function: | |||
Attachments: |
Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference
Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference Bug 19722: (follow-up) Adjust template parameters Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference Bug 19722: (follow-up) Adjust template parameters Bug 19722: Don't show items at job completion if over pref Bug 19722: Add MaxItemsToDisplayForBatchMod systempreference Bug 19722: (follow-up) Adjust template parameters Bug 19722: Don't show items at job completion if over pref |
Description
Nick Clemens (kidclamp)
2017-11-30 15:54:04 UTC
Created attachment 69426 [details] [review] Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference To test: 1 - Get a list of itemnumbers or barcodes 2 - Set MaxItemsToProcessForBatchMod to less than this number of items 3 - Attempt to batch edit, you arent allowed 4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000 5 - Try a list of as many items as possible 30000 was good for me (they should exist in your system) 6 - Try to batch edit, system will timeout on displaying these items 7 - Apply patch, update database 8 - Set MaxItemsToDisplayForBatchMod to 1000 (default) 9 - Try large file again, should not display items, but allow modification, wait for this to finish 10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again 11 - Should be prohibited as before Point 9 and 10 seem to be the same action with two different behaviors waited. Am I missing something ? Could you have a look and explain, please ? (In reply to jmbroust from comment #2) > Point 9 and 10 seem to be the same action with two different behaviors > waited. Am I missing something ? Could you have a look and explain, please ? Ah, they are testing two different preferences: MaxItemsTo Display ForBatchMod MaxItemsTo Process ForBatchMod If process is higher than display you should be able to process as many as process and they just won't show If process is lower and you try to edit more, you should be restricted. Unable to test step 5 et 6 : not enough items in the sandbox At step 9 : the "job progress" bar stays at 0% and I get an error message : "Failed to submit form : error". Nothing happens after that. Other steps are OK. (In reply to abernaud from comment #4) > Unable to test step 5 et 6 : not enough items in the sandbox > > At step 9 : the "job progress" bar stays at 0% and I get an error message : > "Failed to submit form : error". > Nothing happens after that. > > Other steps are OK. You can add 1000+ items to a record in the edit items screen to easily get a large number Step 9 worked fine for me, can you check for JS errors and/or retest? Hi Nick, Yes it work, but I have problem with MaxItemsToProcessForBatchMod, it's not respected. For example, - I use file of 21 barcode - MaxItemsToProcessForBatchMod = 15 The batch item modification open correctly, not as without this patch, but it open all items in the file, not 15 as specify in MaxItemsToProcessForBatchMod. Thanks. Bouzid Fergani Created attachment 74682 [details] [review] Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference To test: 1 - Get a list of itemnumbers or barcodes 2 - Set MaxItemsToProcessForBatchMod to less than this number of items 3 - Attempt to batch edit, you arent allowed 4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000 5 - Try a list of as many items as possible 30000 was good for me (they should exist in your system) 6 - Try to batch edit, system will timeout on displaying these items 7 - Apply patch, update database 8 - Set MaxItemsToDisplayForBatchMod to 1000 (default) 9 - Try large file again, should not display items, but allow modification, wait for this to finish 10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again 11 - Should be prohibited as before Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> (In reply to Nick Clemens from comment #5) > (In reply to abernaud from comment #4) > > > > At step 9 : the "job progress" bar stays at 0% and I get an error message : > > "Failed to submit form : error". > > Nothing happens after that. > > Step 9 worked fine for me, can you check for JS errors and/or retest? I had the same problem as abernaud when I tried to modify 1500 items with this parameters : allowed process = 2000 / display = 1000 I realize I was just impatient :) When I get this error, modification was very long and "Job process" not moving, but no more error when I tried again and waited to the end of modification, or when I tried with smaller quantity of items. Seems ok for me, thank you Nick ! Batch item deletion is broken, please double check. I always get "0 item(s) deleted." Created attachment 77020 [details] [review] Bug 19722: (follow-up) Adjust template parameters Before we passed 'too_many_items' this was renamed to 'too_many_items_display' but deletion template lacked changes To test: 1 - Test a batch deletion by list and file 2 - Test with deleting biblios and without 3 - Results should be as expected The items are displayed at the end of the process (and so can lead to a timeout). Is it expected? You are correct, this should be updated to follow the system preference Created attachment 87033 [details] [review] Bug 19722 - Add MaxItemsToDisplayForBatchMod systempreference To test: 1 - Get a list of itemnumbers or barcodes 2 - Set MaxItemsToProcessForBatchMod to less than this number of items 3 - Attempt to batch edit, you arent allowed 4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000 5 - Try a list of as many items as possible 30000 was good for me (they should exist in your system) 6 - Try to batch edit, system will timeout on displaying these items 7 - Apply patch, update database 8 - Set MaxItemsToDisplayForBatchMod to 1000 (default) 9 - Try large file again, should not display items, but allow modification, wait for this to finish 10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again 11 - Should be prohibited as before Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Created attachment 87034 [details] [review] Bug 19722: (follow-up) Adjust template parameters Before we passed 'too_many_items' this was renamed to 'too_many_items_display' but deletion template lacked changes To test: 1 - Test a batch deletion by list and file 2 - Test with deleting biblios and without 3 - Results should be as expected Created attachment 87035 [details] [review] Bug 19722: Don't show items at job completion if over pref To test: 1 - Set MaxItemsToDisplayForBatchMod to some number 2 - Modify less items than that 3 - Note they show a - Note if over 1000 they show in a simple display 4 - Modify more items 5 - Note they do not show and you see a note Created attachment 87077 [details] [review] Bug 19722: Add MaxItemsToDisplayForBatchMod systempreference To test: 1 - Get a list of itemnumbers or barcodes 2 - Set MaxItemsToProcessForBatchMod to less than this number of items 3 - Attempt to batch edit, you arent allowed 4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000 5 - Try a list of as many items as possible 30000 was good for me (they should exist in your system) 6 - Try to batch edit, system will timeout on displaying these items 7 - Apply patch, update database 8 - Set MaxItemsToDisplayForBatchMod to 1000 (default) 9 - Try large file again, should not display items, but allow modification, wait for this to finish 10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again 11 - Should be prohibited as before Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 87078 [details] [review] Bug 19722: (follow-up) Adjust template parameters Before we passed 'too_many_items' this was renamed to 'too_many_items_display' but deletion template lacked changes To test: 1 - Test a batch deletion by list and file 2 - Test with deleting biblios and without 3 - Results should be as expected Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 87079 [details] [review] Bug 19722: Don't show items at job completion if over pref To test: 1 - Set MaxItemsToDisplayForBatchMod to some number 2 - Modify less items than that 3 - Note they show a - Note if over 1000 they show in a simple display 4 - Modify more items 5 - Note they do not show and you see a note Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Awesome work all! Pushed to master for 19.05 Enhancement, will not be backported to 18.11.x series. |