From 84e94d14958e73bb5bbbc9b372696cd084265652 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 11 Sep 2014 16:24:54 +0200 Subject: [PATCH] [PASSED QA] Bug 12909 - item withdrawn is missing in inventory results In inventory results, CSV or screen, the item withdrawn information is missing. This information can be usefull to understand why an item was not scanned. Test plan : - Check you have in default framework an item subfield mapped with items.withdrawn - Create a biblio with default framework - Create an item with barcode='000AAA1', callnumber='ZZZAAA1' and withdrawn=0 - Create an item with barcode='000AAA2', callnumber='ZZZAAA2' and withdrawn=1 - Go to inventory tool : /cgi-bin/koha/tools/inventory.pl - Enter item callnumber between 'ZZZ' and 'ZZZZ' - Submit => You see a column 'Withdrawn' with withdrawn value - Go to inventory tool : /cgi-bin/koha/tools/inventory.pl - Enter item callnumber between 'ZZZ' and 'ZZZZ' - Check 'Export to CSV file' - Submit - Open exported file => You see a column 'Withdrawn' with withdrawn value Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- C4/Items.pm | 2 +- .../prog/en/modules/tools/inventory.tt | 4 ++++ tools/inventory.pl | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index acb2a9b..88a9ca2 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1034,7 +1034,7 @@ sub GetItemsForInventory { my ( @bind_params, @where_strings ); my $select_columns = q{ - SELECT items.itemnumber, barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, stocknumber + SELECT items.itemnumber, barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber }; my $select_count = q{SELECT COUNT(*)}; my $query = q{ 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 6ec6c2e..fdac5fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -246,6 +246,7 @@ $(document).ready(function(){ Status Lost Damaged + Withdrawn Unseen since Problems @@ -278,6 +279,9 @@ $(document).ready(function(){ [% result.damaged | html %] + [% result.withdrawn | html %] + + [% result.datelastseen | $KohaDates | html %] diff --git a/tools/inventory.pl b/tools/inventory.pl index 6a5ddc4..ba10b14 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -345,7 +345,7 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ items.homebranch items.location items.itemcallnumber items.notforloan items.itemlost items.damaged - items.stocknumber + items.withdrawn items.stocknumber / ) { push @translated_keys, $columns_def_hashref->{$key}; } @@ -354,7 +354,7 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ $csv->combine(@translated_keys); print $csv->string, "\n"; - my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged stocknumber /; + my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged withdrawn stocknumber /; for my $item ( @results ) { my @line; for my $key (@keys) { -- 1.7.2.5