if you attempt to upload a file with more than 1000 lines, you get an error... ---------------------------------------- Batch item modification - Too many items (1001): not displaying each one individually. Return to batch item modification ---------------------------------------- looking that the code its obvious that the intended behavior is to not display the items, yet still allow the items to be edited this functionality seems broken
Created attachment 17859 [details] pic
Just confirmed with a customer that this seems to have been caused by the changes introduced under bug 5521 caused the problem - reverting that change got this working again ( but reintroduced the 5521 bug)
Created attachment 18256 [details] [review] proposed patch This patch corrects the logic while preserving the test from bug 5521
Created attachment 20056 [details] Screenshot of batch operation after applying the patch This patch doesn't solve the problem for me. See the attached screenshot. I still don't get the option to make any modifications. The table and its related controls shouldn't be shown at all. All I should see is the message ("Too many items" -- and properly styled in a <div class="dialog message">) and the form for making modifications.
Also, please provide a proper test plan with any new patch.
Created attachment 45326 [details] [review] Bug 10163 - batch-mod items tool fails on files over 1000 lines long When using batch modification tool, if number of items is too big (default 1000), the edit form is not displayed. In perl script, when number of items is too big, template var "item_loop" is not defined and var "too_many_items"is set. This patch allows the display of edit form and text "The following barcodes were found: " even when number of items is too big. Test plan : - Create a file with 11 existing barcodes and 1 not existing in catalogue - Set syspref MaxItemsForBatch to 1000 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode, a table with found items and the edit form - Set syspref MaxItemsForBatch to 10 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode and a text "Too many items ..." => Without patch you don't see the edit form => With patch you see the edit form and can perform the batc modifications
I propose a corrected patch.
(In reply to Mason James from comment #0) > looking that the code its obvious that the intended behavior is to not > display the items, yet still allow the items to be edited Fridolin patch restores the above, ie the items are not displayed when there are more than MaxItemsForBatch items, but editing them globally is possible. The question may be that MaxItemsForBatch syspref states: Process up to MaxItemsForBatch in a single modification or deletion batch. It seems that the wording is not exactly true.
Created attachment 45723 [details] [review] [SIGNED-OFF] Bug 10163 - batch-mod items tool fails on files over 1000 lines long When using batch modification tool, if number of items is too big (default 1000), the edit form is not displayed. In perl script, when number of items is too big, template var "item_loop" is not defined and var "too_many_items"is set. This patch allows the display of edit form and text "The following barcodes were found: " even when number of items is too big. Test plan : - Create a file with 11 existing barcodes and 1 not existing in catalogue - Set syspref MaxItemsForBatch to 1000 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode, a table with found items and the edit form - Set syspref MaxItemsForBatch to 10 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode and a text "Too many items ..." => Without patch you don't see the edit form => With patch you see the edit form and can perform the batc modifications Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test plan followed successfully. Item modifications completed correctly.
See bug 11343 and bug 11490 for the same discussion. It would be good to be sure it is what we really want. In any case, either the pref description or the patch should be updated.
Bug 11490 is now integrated, is this bug still valid ?
(In reply to Fridolin Somers from comment #11) > Bug 11490 is now integrated, is this bug still valid ? I believe this fixed the issue. We now have: * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod Marking RESOLVED, please reopen if you disagree!