From 92e0d59ec2095fe80361908a6db352125bdbb835 Mon Sep 17 00:00:00 2001 From: David Birmingham Date: Thu, 15 Jan 2015 19:27:25 +0000 Subject: [PATCH] [#56448214] Random drop down menu order when updating member attribute SC 39223 Drop down menu sorting was not being applied when editing (updating) member attributes that were already assigned a value. --- cgi/members/memberentry.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi/members/memberentry.pl b/cgi/members/memberentry.pl index 45445a69eb..1378e56307 100755 --- a/cgi/members/memberentry.pl +++ b/cgi/members/memberentry.pl @@ -789,11 +789,11 @@ sub patron_attributes_form { $newentry->{use_dropdown} = 0; if ($attr_type->authorised_value_category()) { $newentry->{use_dropdown} = 1; - $newentry->{auth_val_loop} = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value}); + my $authvals = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value}); + $newentry->{auth_val_loop} = [ sort {lc($a->{lib}) cmp lc($b->{lib})} @{$authvals} ]; } $i++; $newentry->{form_id} = "patron_attr_$i"; - #use Data::Dumper; die Dumper($entry) if $entry->{use_dropdown}; push @attribute_loop, $newentry; } } else {