From 332cc3e6672d6991b1ab06970f1f2b19244485f8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Oct 2020 12:38:13 +0200 Subject: [PATCH] Bug 26539: Display patron's attributes without case sensitivity --- members/memberentry.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index bd1509eb09..9f28425130 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -916,7 +916,7 @@ sub patron_attributes_form { # map patron's attributes into a more convenient structure my %attr_hash = (); foreach my $attr (@$attributes) { - push @{ $attr_hash{$attr->{code}} }, $attr; + push @{ $attr_hash{lc($attr->{code})} }, $attr; } my @attribute_loop = (); @@ -932,8 +932,8 @@ sub patron_attributes_form { category_code => $attr_type->category_code(), mandatory => $attr_type->mandatory(), }; - if (exists $attr_hash{$attr_type->code()}) { - foreach my $attr (@{ $attr_hash{$attr_type->code()} }) { + if (exists $attr_hash{lc($attr_type->code)}) { + foreach my $attr (@{ $attr_hash{lc($attr_type->code)} }) { my $newentry = { %$entry }; $newentry->{value} = $attr->{attribute}; $newentry->{use_dropdown} = 0; -- 2.20.1