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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 29f9518785)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c63b49d8d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Lucas Gass 2025-09-19 17:22:53 +00:00 committed by Fridolin Somers
parent 829d8292b6
commit b93dafbb9e
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ if ( $op eq 'cud-show' || $op eq 'show' ) {
category_lib => $category_lib,
type => $attr_type->authorised_value_category ? 'select' : 'text',
};
@patron_attributes_codes = sort { $a->{attribute_lib} cmp $b->{attribute_lib} } @patron_attributes_codes;
}
my @attributes_header = ();