From f113c8261f7806152092c4a9eb840e0fd56e27f6 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Thu, 18 Jul 2024 16:03:10 +0200 Subject: [PATCH] Bug 18657: Add the possibility to add every items to the report Currently the tool reports: Incorrect not-for-loan values Wrong place Checked out We should have: Optional display of items w/o problems Display of missing/lost items now marked found TEST PLAN 1 - Mark an item as lost 2 - Go to tools->inventory 3 - Fill in the barcode list with the barcode of the item, notice there is one checkbox in "Additional options" 4 - Submit -> there should be no result 5 - Apply patches and redo 1,2&3 6 - Notice there are now 3 checkboxes in "Additional options" 7 - Click on "Add lost items to the report" 8 - Submit -> there is now one line in the report with problem "Item was lost and is now marked as found" 9 - Go to tools->inventory 10 - Click on "Add lost items to the report" 11 - Submit -> there is no line in the report 12 - Go to tools->inventory 13 - Click on "Add items without problem to the report" 11 - Submit -> there is now line in the report with an empty problem --- .../intranet-tmpl/prog/en/modules/tools/inventory.tt | 4 ++++ tools/inventory.pl | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 79665ed..eda8e86 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -256,6 +256,10 @@ +
  • + + +
  • diff --git a/tools/inventory.pl b/tools/inventory.pl index 473a334..3f424ab 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -128,6 +128,11 @@ if ( defined $input->param('ReportLostItems') && $input->param('ReportLostItems' $report_lost_items = "1"; } +my $report_items_without_problems; +if ( defined $input->param('ReportItemsWithoutProblem') && $input->param('ReportItemsWithoutProblem') eq 'on' ) { + $report_items_without_problems = "1"; +} + # if there's a list of not for loans types selected use it rather than # the full set. @notforloans = @{$staton->{'items.notforloan'}} if defined $staton->{'items.notforloan'} and scalar @{$staton->{'items.notforloan'}} > 0; @@ -350,6 +355,10 @@ for ( my $i = 0; $i < @scanned_items; $i++ ) { $item->{problems}->{lost} = 1; additemtoresults( $item, $results ); } + + if ($report_items_without_problems) { + additemtoresults( $item, $results ); + } } # Compare barcodes with inventory list, report no_barcode and not_scanned. -- 2.43.0