On the members-home.pl page and the members/search.pl pop-up, the dropdown menu to select the number of shown entries, there is two times the option for '20' results. Seen on master and 20.11.11
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!