Bug 19681

Summary: label-item-search.pl result count formatting error when there is only one page
Product: Koha Reporter: David Bourgault <david.bourgault>
Component: Label/patron card printingAssignee: David Bourgault <david.bourgault>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, m.de.rooy, nick, philippe.blouin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 19681 - Correct result count formatting
Bug 19681 - Correct result count formatting
Bug 19681 - Correct result count formatting
Bug 19681: Correct result count formatting

Description David Bourgault 2017-11-22 18:55:34 UTC
When doing an item search through label-item-search.pl, if there is a only one page of results the formatting of the result count is weird.

To reproduce:
0) Go to Tools > Label creator > New > Label batch
1) Add items
2) Do a search that will return few items
3) The result count will read "Results through of X" instead of "Results 1 through X of X"

The error is also present on 16.05.
Comment 1 David Bourgault 2017-11-22 18:59:13 UTC
Created attachment 69289 [details] [review]
Bug 19681 - Correct result count formatting

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"
Comment 2 Owen Leonard 2017-11-22 19:43:40 UTC
Created attachment 69293 [details] [review]
Bug 19681 - Correct result count formatting

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 David Bourgault 2017-11-22 19:58:50 UTC
Created attachment 69294 [details] [review]
Bug 19681 - Correct result count formatting

Small correction, previous patch accidentally changed the file mode to 644.

--

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Marcel de Rooy 2017-11-24 09:39:14 UTC
Created attachment 69333 [details] [review]
Bug 19681: Correct result count formatting

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Jonathan Druart 2017-12-07 12:40:26 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 6 Nick Clemens 2017-12-14 12:31:36 UTC
Pushed to stable for 17.11.01, awesome work all!
Comment 7 Fridolin Somers 2017-12-20 08:35:37 UTC
Pushed to 17.05.x, will be in v17.05.07