Bug 11253: tools/inventory.pl: fix handling of inventory date
authorMark Tompsett <mtompset@hotmail.com>
Tue, 18 Mar 2014 15:44:42 +0000 (11:44 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 27 May 2014 13:57:53 +0000 (15:57 +0200)
commit16a641f8a73aa29dec4d31b1f2f02638451b7902
tree906fb660b0896cf32b620bc9dc363669e29d0ca4
parent5d1519ad18a56f8ade3e4e92ebf6119c9543485a
Bug 11253: tools/inventory.pl: fix handling of inventory date

This patch fixes a stray call to output_pref() that had not been
updated by the patch for 10380, which caused a crash when uploading
a barcode file when the dd/mm/yyyy dateformat is in use.

TEST PLAN
---------
Set I18N/L10N system preference of dateformat to dd/mm/yyyy.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Select the branch (i.e. not All libraries) to match.
Click submit
KABOOM!

Apply patch
Go to inventory/stocktaking tool.
Browse for the barcode file.
Select the branch (i.e. not All libraries) to match.
Click submit
Table displays dates in "Unseen since" column.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Before the patch, I had this error when using dateformat=ddmmyy:
Template process failed: undef error - The 'day' parameter ("2014") to DateTime::new did not pass the 'an integer which is a possible valid day of month' callback at /usr/local/share/perl5/Params/Validate/PP.pm line 633.
This patch corrects the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed problem before applying the patch. Tested with the
patch all dateformat setting still work correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 536345c3b84ac91540b9f20f6e090a7e91343ec6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
tools/inventory.pl