From 6e2387ca8bd4889db2aab4005b7b7dae12e5004a Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 22 Jun 2018 08:29:58 +0000 Subject: [PATCH] Bug 20271: (QA follow-up) Fix catalogue statistics in reports module Test plan: 1) Have some deleted and some not deleted items 2) Use catalogue statistics in reports module and try to filter total/deleted items --> without this patch the deleted options returns not deleted items and total returns deleted items --> with this patch you should be able to filter the results to deleted, not deleted and all items and everyone of this filter should work Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt | 6 +++++- reports/catalogue_stats.pl | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt index 0347e72..5158a1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt @@ -245,7 +245,7 @@ Cell value
  1. - +
  2. @@ -256,6 +256,10 @@
  3. +
  4. + + +
diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 54f63a8..7a4e637 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -46,7 +46,7 @@ my $fullreportname = "reports/catalogue_stats.tt"; my $do_it = $input->param('do_it'); my $line = $input->param("Line"); my $column = $input->param("Column"); -my $cellvalue = $input->param("Cellvalue"); # one of 'items', 'biblios' +my $cellvalue = $input->param("Cellvalue"); # one of 'items', 'biblios', 'deleteditems', 'allitems' my @filters = $input->multi_param("Filter"); my $cotedigits = $input->param("cotedigits"); my $output = $input->param("output"); @@ -175,7 +175,7 @@ sub calculate { my $itemstable = 'items'; my $deleted_where = "items.deleted_on IS NULL"; $deleted_where = "1" if $cellvalue eq 'allitems'; - $deleted_where = "items.deleted_on IS NOT NULL" if $cellvalue eq 'items'; + $deleted_where = "items.deleted_on IS NOT NULL" if $cellvalue eq 'deleteditems'; my $dbh = C4::Context->dbh; -- 2.1.4