When using the batch mod tools and entering in a set of barcodes the table of found items is ordered by itemnumber instead of by the order in which the barcodes were scanned. This is a problem for librarians who scan a batch of books and then get a table ordered completely different.
Created attachment 140052 [details] [review] Bug 31455: Make batchMod sort by order scanned To test: 1. In batch item deletion and batch item modification add some barcodes. 2. Notice they are being sorted by item number, not in the order scanned. 3. Appply patch and restart services. 4. Try scanning items again in both batch item deletion and batch item modification. 5. The found barcodes should now sort by order scanned.
Created attachment 140059 [details] [review] Bug 31455: Make batchMod sort by order scanned To test: 1. In batch item deletion and batch item modification add some barcodes. 2. Notice they are being sorted by item number, not in the order scanned. 3. Appply patch and restart services. 4. Try scanning items again in both batch item deletion and batch item modification. 5. The found barcodes should now sort by order scanned. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 140061 [details] [review] Bug 31455: Make batchMod sort by order scanned To test: 1. In batch item deletion and batch item modification add some barcodes. 2. Notice they are being sorted by item number, not in the order scanned. 3. Appply patch and restart services. 4. Try scanning items again in both batch item deletion and batch item modification. 5. The found barcodes should now sort by order scanned. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Created attachment 140062 [details] [review] Bug 31455: (QA follow-up) Make table creation O(N) We can insert the indices before the main loop to a hash, this way we don't have to look up during each loop iteration the index from an array which in the worst case might take O(N) thus making the total time complexity O(N^2). Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.05
Thanks! Pushed to 21.11 for 21.11.12
We could have define no sort by default like in batch record modification : "aaSorting": [],
(In reply to Arthur Suzuki from comment #7) > Thanks! > > Pushed to 21.11 for 21.11.12 Ich I dont see first patch in 21.11.x : https://git.koha-community.org/Koha-community/Koha/commits/branch/21.11.x/search?q=31455
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, note: mark resolved when the issue with 21.11 missing a patch is resolved.