From 29c1c6444ba052f7719748c427f06131573956ae Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Jan 2024 13:41:59 +0100 Subject: [PATCH] Bug 35817: Fix hint on patron's category when batch update patron MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a patron's attribute is limited to a given patron's category, the batch patron modification tool will display a hint "This attribute will be only applied to the patron's category %s". But this is followed by the description of the patron's attribute, not the patron's category. Test plan: Create a patron's attribute "Color of hair" and select a patron category (Patron). Batch edit batch and select "Color of hair" A hint will be display. => Without this patch the hint is "This attribute will be only applied to the patron's category Color of hair" => With this patch it will be corrected to "This attribute will be only applied to the patron's category Patron" Signed-off-by: Anneli Österman --- tools/modborrowers.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 36c893b4163..9eceff6402e 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -147,9 +147,9 @@ if ( $op eq 'show' ) { }; my $category_code = $attr_type->category_code; - my ( $category_lib ) = map { - ( defined $category_code and $attr_type->category_code eq $category_code ) ? $attr_type->description : () - } @patron_categories; + my ($category_lib) = + map { ( defined $category_code and $attr_type->category_code eq $_->categorycode ) ? $_->description : () } + @patron_categories; push @patron_attributes_codes, { attribute_code => $attr_type->code, -- 2.34.1