From 49256cb4848830c3989b041bbbbbe393f19018e7 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=utf8 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 Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer (cherry picked from commit 074684eaf4f7845e6ad3cb50bd5f941dc5783746) Signed-off-by: Fridolin Somers (cherry picked from commit 5809d746d4f148817812de2b685083664e8b6806) Signed-off-by: Lucas Gass --- tools/modborrowers.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 46f79d70eb..8ced0fe83a 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -150,9 +150,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.39.5