[Bug 10867] New: Adding label to batch, search by date requires "on or after date".
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10867 Bug ID: 10867 Summary: Adding label to batch, search by date requires "on or after date". Change sponsored?: --- Product: Koha Version: 3.12 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Label printing Assignee: cnighswonger@foundations.edu Reporter: rudolfbyker@gmail.com QA Contact: testopia@bugs.koha-community.org When searching for items to add to a batch of labels, the "Added on or after date" has to be filled in when the "Added on or before date" field is filled in. Steps to reproduce: ** Log in, and go to Home › Tools › Labels home › Manage label Batches › New Batch › Add Items ** Select a date in the "on or before" field, but not in the "on or after" field. ** It does not matter whether a keyword/title/etc. is specified. ** Click "Search" ** Error occurs: Software error: Can't call method "output" without a package or object reference at /usr/share/koha/intranet/cgi-bin/labels/label-item-search.pl line 100. Taking a look at the code: 77 $datefrom = $query->param('datefrom'); 78 $dateto = $query->param('dateto'); 79 80 if ($datefrom) { 81 $datefrom = C4::Dates->new($datefrom); 82 if ($QParser) { 83 $ccl_query .= ' && ' if $ccl_textbox; 84 $ccl_query .= 85 "acqdate(" . $datefrom->output("iso") . '-)'; 86 } else { 87 $ccl_query .= ' and ' if $ccl_textbox; 88 $ccl_query .= 89 "acqdate,st-date-normalized,ge=" . $datefrom->output("iso"); 90 } 91 } 92 93 if ($dateto) { 94 $dateto = C4::Dates->new($dateto); 95 if ($QParser) { 96 $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom ); 97 $ccl_query .= "acqdate(-" . $dateto->output("iso") . ')'; 98 } else { 99 $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom ); 100 $ccl_query .= "acqdate,st-date-normalized,le=" . $datefrom->output("iso"); 101 } 102 } At line 100, $datefrom is used, without cheking whether it is set. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10867 --- Comment #1 from Rudolf Byker <rudolfbyker@gmail.com> --- I forgot to add the workaround! Simply specify a very early date (many years ago). That will solve the problem for most users, but is inconvenient. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10867 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |gmcharlt@gmail.com Resolution|--- |DUPLICATE --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> --- *** This bug has been marked as a duplicate of bug 11222 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org