From 82c7631d7f97a403f589a55892d52aae1bb42ead Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 13 Jan 2021 11:22:53 +0000 Subject: [PATCH] Bug 27420: Use object accessor for $attr_type->class() We introduced a bug in the patron attribute forms with bug 5161. Test plan 1/ Create two PA_CLASS authorized values 2/ Create two corresponding patron attribute types referencing the above classes. 3/ Edit a patron, both attributes should appear within their own fieldsets at the bottom of the member entry form. 4/ Set a value for the first of the two patron attributes and save 5/ Edit the patron again, note that the first attribute no longer resides within it's own fieldset 6/ Apply the patch 7/ Edit the patron again, note that the first attribute now resides inside it's own fieldset again 8/ Signoff --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 221026acb9..3fe2e97aa6 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -944,7 +944,7 @@ sub patron_attributes_form { $i++; undef $newentry->{value} if ($attr_type->unique_id() && $op eq 'duplicate'); $newentry->{form_id} = "patron_attr_$i"; - push @{$items_by_class{$attr_type->{class}}}, $newentry; + push @{$items_by_class{$attr_type->class()}}, $newentry; } } else { $i++; -- 2.20.1