From 1774cc51da44b048d26b82d12b0614afd5fba1be Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Thu, 21 Mar 2024 09:25:08 +0100 Subject: [PATCH] Bug 36380 : Add filter value on patron statistics report summary Test plan: 1) Go to reports and select "Patrons" 2) Select some filters (patron category, library,..) and run it 3) Normally you will see filters selected but with blank value like "branch code = " 4) Apply this patch 5) Refresh Sponsored by: BibLibre --- reports/borrowers_stats.pl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 4e0f6459994..2aee2d1b2b3 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -184,15 +184,14 @@ sub calculate { foreach my $i (0 .. scalar @$filters) { my %cell; if ( @$filters[$i] ) { - if ( $i == 0) { $cell{crit} = "Cat code"; } - elsif ( $i == 1 ) { $cell{crit} = "ZIP/Postal code"; } - elsif ( $i == 2 ) { $cell{crit} = "Branch code"; } - elsif ( $i == 3 || - $i == 4 ) { $cell{crit} = "Date of birth"; } - elsif ( $i == 5 ) { $cell{crit} = "Sex"; } - elsif ( $i == 6 ) { $cell{crit} = "Sort1"; } - elsif ( $i == 7 ) { $cell{crit} = "Sort2"; } - else { $cell{crit} = "Unknown"; } + if ( $i == 0 ) { $cell{crit} = "Cat code"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 1 ) { $cell{crit} = "ZIP/Postal code"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 2 ) { $cell{crit} = "Branch code"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 3 || $i == 4 ) { $cell{crit} = "Date of birth"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 5 ) { $cell{crit} = "Sex"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 6 ) { $cell{crit} = "Sort1"; $cell{filter} = @$filters[$i]; } + elsif ( $i == 7 ) { $cell{crit} = "Sort2"; $cell{filter} = @$filters[$i]; } + else { $cell{crit} = "Unknown"; } push @loopfilter, \%cell; } -- 2.30.2