Bug 40843

Summary: On modborrowers.pl patron attributes should sort by the description, not the code
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: ToolsAssignee: Lucas Gass (lukeg) <lucas>
Status: Pushed to oldstable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: andrew, fridolin.somers, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch fixes a problem in the batch patron modification tool where extended patron attributes were sorting based on the code, instead of the description.
Version(s) released in:
25.11.00,25.05.06,24.11.11
Circulation function:
Attachments: Bug 40843: Sort patron attributes by description
Bug 40843: Sort patron attributes by description
Bug 40843: Sort patron attributes by description
Bug 40843: Sort patron attributes by description

Description Lucas Gass (lukeg) 2025-09-19 17:22:18 UTC
To recreate:

1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools >  Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description. 

It should sort by description.
Comment 1 Lucas Gass (lukeg) 2025-09-19 17:23:22 UTC
Created attachment 186626 [details] [review]
Bug 40843: Sort patron attributes by description
Comment 2 Lucas Gass (lukeg) 2025-09-19 17:26:33 UTC
Created attachment 186627 [details] [review]
Bug 40843: Sort patron attributes by description

To test:

1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools >  Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description.
5/ APPLY PATCH and restart_all
6/ Try again, it should sort by the description
Comment 3 Brendan Lawlor 2025-10-31 17:45:15 UTC
Created attachment 188828 [details] [review]
Bug 40843: Sort patron attributes by description

To test:

1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools >  Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description.
5/ APPLY PATCH and restart_all
6/ Try again, it should sort by the description

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 4 Martin Renvoize (ashimema) 2025-11-18 19:14:25 UTC
Created attachment 189681 [details] [review]
Bug 40843: Sort patron attributes by description

To test:

1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools >  Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description.
5/ APPLY PATCH and restart_all
6/ Try again, it should sort by the description

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Lucas Gass (lukeg) 2025-11-19 19:29:16 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Paul Derscheid 2025-11-25 16:30:51 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 7 Fridolin Somers 2025-12-04 10:33:11 UTC
Pushed to 24.11.x for 24.11.11