Bugzilla – Attachment 23876 Details for
Bug 11253
tools/inventory.pl output_pref ignores 'iso' parameter passed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11253 - tools/inventory.pl output_pref ignores 'iso' parameter passed
Bug-11253---toolsinventorypl-outputpref-ignores-is.patch (text/plain), 3.05 KB, created by
Mark Tompsett
on 2013-12-31 01:03:06 UTC
(
hide
)
Description:
Bug 11253 - tools/inventory.pl output_pref ignores 'iso' parameter passed
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2013-12-31 01:03:06 UTC
Size:
3.05 KB
patch
obsolete
>From 0187573658af2853f238f828c5150a6a9f193503 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 26 Nov 2013 14:40:35 -0500 >Subject: [PATCH] Bug 11253 - tools/inventory.pl output_pref ignores 'iso' > parameter passed > >Took all the output_pref function calls and converted them >to the newer hash format parameter. Added special case for >dd-mm-yyyy calls, so dt_from_string works correctly. > >TEST PLAN >--------- >Create a small barcode file from books in a given branch. >Set I18N/L10N system preference of dateformat to mm/dd/yyyy. >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. > >Set I18N/L10N system preference of dateformat to yyyy-mm-dd. >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. > >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. >--- > tools/inventory.pl | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 3d8939e..4301e6b 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -150,8 +150,14 @@ my @scanned_items; > my @errorloop; > if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) { > my $dbh = C4::Context->dbh; >- my $date = dt_from_string( $input->param('setdate') ); >- $date = output_pref( $date, 'iso' ); >+ my $date; >+ if (C4::Context->preference('dateformat') eq 'dd/mm/yyyy') { >+ $date = dt_from_string( $input->param('setdate'), 'metric' ); >+ } >+ else { >+ $date = dt_from_string( $input->param('setdate') ); >+ } >+ $date = output_pref( { dt => $date, dateformat => 'iso' } ); > > my $strsth = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?"; > my $qonloan = $dbh->prepare($strsth); >@@ -204,9 +210,9 @@ if ( $markseen or $op ) { > # If "compare barcodes list to results" has been checked, we want to alert for missing items > if ( $compareinv2barcd ) { > # set "missing" flags for all items with a datelastseen (dls) before the choosen datelastseen (cdls) >- my $dls = output_pref( dt_from_string( $datelastseen ), 'iso' ); >+ my $dls = output_pref( { dt => dt_from_string( $datelastseen ), dateformat => 'iso' } ); > foreach my $item ( @$inventorylist ) { >- my $cdls = output_pref( dt_from_string( $_->{datelastseen} ), 'iso' ); >+ my $cdls = output_pref( { dt => dt_from_string( $_->{datelastseen} ), dateformat => 'iso' } ); > if ( $cdls lt $dls ) { > $item->{problem} = 'missingitem'; > # We have to push a copy of the item, not the reference >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11253
:
23179
|
23180
|
23876
|
25679
|
26437
|
27081
|
27317