Summary: | Error in warning message when deleting list | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Lists | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | ian, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 8521 - Error in warning message when deleting list
Signed off patch [PASSED QA] Bug 8521 - Error in warning message when deleting list |
Description
Owen Leonard
2012-07-30 14:06:41 UTC
Created attachment 29751 [details] [review] Bug 8521 - Error in warning message when deleting list When deleting a list the operation is blocked if there are items still on the list, and the interface shows a warning which includes a count of the items on the list. This count is broken for lists containing more items than the number specified in the numSearchResults system preference. This patch corrects the item count to use an actual count of the total number of results, not the total number of results in the first page of results. The template change to the staff client copies some language logic from the OPAC template for dealing with a single number of list entries. Test in both the OPAC and the staff client. Check the number specified in the numSearchResults system preference and locate or create a list containing more than that number of items. Try to delete the list. You should receive a warning message stating the correct total number of items on the list. Test also with a list which contains fewer than numSearchResults entries, and a list which contains zero entries. Created attachment 30064 [details] [review] Signed off patch Tested Public and Private lists with 0, 5 & 25 entries, Public with 40 and Private with 45. Working as expected. Comment on attachment 30064 [details] [review] Signed off patch Review of attachment 30064 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ +234,5 @@ > [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No list number given.</div>[% END %] > [% IF ( paramsloo.need_confirm ) %] > <div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty. > + [% IF ( paramsloo.single ) %] > + <br />It has <b>[% paramsloo.count %]</b> entry. The <b> will split up this sentence on translation - is it really necessary here? :) Created attachment 30523 [details] [review] [PASSED QA] Bug 8521 - Error in warning message when deleting list When deleting a list the operation is blocked if there are items still on the list, and the interface shows a warning which includes a count of the items on the list. This count is broken for lists containing more items than the number specified in the numSearchResults system preference. This patch corrects the item count to use an actual count of the total number of results, not the total number of results in the first page of results. The template change to the staff client copies some language logic from the OPAC template for dealing with a single number of list entries. Test in both the OPAC and the staff client. Check the number specified in the numSearchResults system preference and locate or create a list containing more than that number of items. Try to delete the list. You should receive a warning message stating the correct total number of items on the list. Test also with a list which contains fewer than numSearchResults entries, and a list which contains zero entries. Signed-off-by: Ian Beardslee <ian@catalyst.net.nz> Tested Public and Private lists with 0, 5 & 25 entries, Public with 40 and Private with 45. Working as expected. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. Patch pushed to master. Thanks Owen! |