Summary: | Duplicate '20' option in dropdown 'Show entries' menu | ||
---|---|---|---|
Product: | Koha | Reporter: | Séverine Queune <severine.queune> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | RESOLVED FIXED | QA Contact: | Lucas Gass (lukeg) <lucas> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, gmcharlt, jesse, jonathan.druart, kyle.m.hall, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38353 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the options for the number of entries to show for patron search results in the staff interface - 20 was listed twice.
|
Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |||
Attachments: |
Bug 30397: Remove duplicate entry from length menu of patrons search
Bug 30397: Remove duplicate entry from length menu of patrons search Bug 30397: Remove duplicate entry from length menu of patrons search |
Description
Séverine Queune
2022-03-29 15:01:33 UTC
Created attachment 173800 [details] [review] Bug 30397: Remove duplicate entry from length menu of patrons search If you have 20 in PatronsPerPage, there will be two 20 entries in the length menu of the patrons search. jQuery.unique is stupid it seems, it requires the array to be sorted (?) let x = [1, 2, 1, 2] jQuery.unique(x); Array(4) [ 1, 2, 1, 2 ] x = [1, 1, 2, 2] jQuery.unique(x); Array [ 1, 2 ] Created attachment 173838 [details] [review] Bug 30397: Remove duplicate entry from length menu of patrons search If you have 20 in PatronsPerPage, there will be two 20 entries in the length menu of the patrons search. jQuery.unique is stupid it seems, it requires the array to be sorted (?) let x = [1, 2, 1, 2] jQuery.unique(x); Array(4) [ 1, 2, 1, 2 ] x = [1, 1, 2, 2] jQuery.unique(x); Array [ 1, 2 ] Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. In the staff interface, go to Patrons > click the search button under the "Search for patron" section on the left. 2. In the results, select the dropdown list to change the number of entries for the results (the default is 20). 3. Note that 20 appears twice. 4. Apply the patch. 5. Restart everything: restart_all 6. Repeat steps 1-2: ==> Result: 20 only appears once Created attachment 173887 [details] [review] Bug 30397: Remove duplicate entry from length menu of patrons search If you have 20 in PatronsPerPage, there will be two 20 entries in the length menu of the patrons search. jQuery.unique is stupid it seems, it requires the array to be sorted (?) let x = [1, 2, 1, 2] jQuery.unique(x); Array(4) [ 1, 2, 1, 2 ] x = [1, 1, 2, 2] jQuery.unique(x); Array [ 1, 2 ] Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 Not pushed to LTS. Marked Resolved. If you feel this should be in LTS please reply with your reason. |