When searching for patrons the results are sorted by surname, firstname if CAN_user_tools_manage_patron_lists otherwise they are sorted by cardnumber This seems to be a confusion in the template - the checkbox column is only hidden if the user cannot edit patrons or add them to a list, however, the sorting assumes it is hidden if they cannot add patrons to a list
Created attachment 82015 [details] [review] Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons To test: 1 - Create four users: 1 superlibrarian (or with both edit patrons and manage patron lists) 1 with only edit patrons and catalogue 1 with only add to list and catalogue 1 with catalogue but neither edit patrons or manage patron lists 2 - Search patrons signed in as each user 3 - Note different sorting 4 - Apply patch 5 - Try searching with each patron 6 - Results should always be sorted by surname, firstname 7 - Only in the case of neither extra permission should the checkboxes be absent
Created attachment 82768 [details] [review] Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons To test: 1 - Create four users: 1 superlibrarian (or with both edit patrons and manage patron lists) 1 with only edit patrons and catalogue 1 with only add to list and catalogue 1 with catalogue but neither edit patrons or manage patron lists 2 - Search patrons signed in as each user 3 - Note different sorting 4 - Apply patch 5 - Try searching with each patron 6 - Results should always be sorted by surname, firstname 7 - Only in the case of neither extra permission should the checkboxes be absent It worked as described. Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Nick, if we want the sorting to be always consistant, why not to even remove the whole condition?
if they have neither of those permissions there won't be the extra column, we will sort by the first column so we need the test to know if we wort on index 1 or 2 if we can name the column using class or something for sort instead of using the index that could avoid the conditions
Created attachment 82876 [details] [review] Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons To test: 1 - Create four users: 1 superlibrarian (or with both edit patrons and manage patron lists) 1 with only edit patrons and catalogue 1 with only add to list and catalogue 1 with catalogue but neither edit patrons or manage patron lists 2 - Search patrons signed in as each user 3 - Note different sorting 4 - Apply patch 5 - Try searching with each patron 6 - Results should always be sorted by surname, firstname 7 - Only in the case of neither extra permission should the checkboxes be absent Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.01
Pushed to 18.05.x for 18.05.08
Pushed to 17.11.x for 17.11.14