When you have large lists of say 2000 entries, the option Print a list may be very time consuming. Especially when an impatient user hits refresh a couple of times, this might affect your server performance. This patch adds paging to list printing when the number of list entries is over 200 (just a constant). The number of entries to print is now governed by preference OPACnumSearchResults.
Created attachment 65020 [details] [review] Bug 18937: Limit the number of list entries to print When you have large lists of say 2000 entries, the option Print a list may be very time consuming. Especially when an impatient user hits refresh a couple of times, this might affect your server performance. This patch adds paging to list printing when the number of list entries is over 200 (just a constant). The number of entries to print is now governed by preference OPACnumSearchResults. Test plan: [1] Pick a small list. Verify that print (add print=1 to URL) includes all records. [2] Pick a large list (>200 entries). Verify that print now only includes records of the current page.
I tried this with a list which has 281 items and it didn't seem to be working. When I printed the list I got the whole thing. I'm not sure this is the right solution anyway... Won't this be confusing to the user? Sometimes they get the whole list and sometimes they don't?
Created attachment 65533 [details] Printed list This print only contains a limited number of entries. (The list itself has more than 200 entries.)
(In reply to Owen Leonard from comment #2) > I tried this with a list which has 281 items and it didn't seem to be > working. When I printed the list I got the whole thing. Thanks for testing. This patch runs in production with us on 3.22.x without problems. I retested master and it works fine too. Did you restart Plack? Please check your dev environment setup. If you use kohadevbox, verify that your PERL5LIB path points to master with this patch, and not to the installed clone. > I'm not sure this is the right solution anyway... Won't this be confusing to > the user? Sometimes they get the whole list and sometimes they don't? I have no other simple solution here. Slowing the server down for all other users is a good reason imo to interfere. The number of 200 is arguable and could be increased or even pref controlled (if we really want another pref). I had this issue with a list of about 1500 entries. So, maybe we should go to 500 ?
I agree with Owen that a hard limit of 200 doesn't feel like the right solution. I think if this is the only way, there should be a pref and also a message to the user that only a part of the list can be printed and they should be using the download options to get their complete data out.