From 86de022d25a2251f33da38eed57e92334a921150 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 36c893b416..4b9c7146d8 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -148,7 +148,7 @@ 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 : () + ( defined $category_code and $attr_type->category_code eq $_->categorycode ) ? $_->description : () } @patron_categories; push @patron_attributes_codes, { -- 2.30.2