Bug 11222 - A regression on label-item-search.pl done by Bug 9239
Summary: A regression on label-item-search.pl done by Bug 9239
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Chris Nighswonger
QA Contact: Testopia
URL:
Keywords:
: 10867 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-08 17:05 UTC by Zeno Tajoli
Modified: 2015-06-04 23:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Fix for bug 11222 (866 bytes, patch)
2013-11-08 17:14 UTC, Zeno Tajoli
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11222 - A regression on label-item-search.pl done by Bug 9239 (1.86 KB, patch)
2013-11-15 13:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11222 - A regression on label-item-search.pl done by Bug 9239 (1.92 KB, patch)
2013-11-22 16:07 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Zeno Tajoli 2013-11-08 17:05:46 UTC
Hi to all,

the commit http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=144c7f4e4e023f7a701a1e58524409628295343b for bug 9239 insert
a regression on the search of items in print labels.

In fact it an error only in one line, line 100.

The patch is:
- $ccl_query .= "acqdate,st-date-normalized,le=" . $datefrom->output("iso");
+ $ccl_query .= "acqdate,st-date-normalized,le=" . $dateto->output("iso");
Comment 1 Zeno Tajoli 2013-11-08 17:14:08 UTC Comment hidden (obsolete)
Comment 2 Zeno Tajoli 2013-11-08 17:22:38 UTC
Test plan:

1)Start with an installation with bibliografic data and items information.
2)Check that in items there are values inside Accession Date

Without the patch:
a)Go in Home› Tools› Labels  and click on 'New batch'
b)Click on 'Add Item(s)'
c)Try to select items with option "Added on or before date"
d)You will receive an error

With the patch:
Redone points a),b), c)
Now you don't receive an error and you can select items
Comment 3 Zeno Tajoli 2013-11-08 17:23:16 UTC
This bug is on 3.12, 3.14, master
Comment 4 Owen Leonard 2013-11-14 17:56:25 UTC
> c)Try to select items with option "Added on or before date"
> d)You will receive an error

I cannot reproduce this error. Nor can I get any results for any date-based search, whether it be the "before" option, the "after," or both.
Comment 5 Zeno Tajoli 2013-11-14 18:09:48 UTC
So in you install the two optinons not work ?
Do you have date inside 'Acquisition date field' in the iterm section. ?
In MARC21 is the field 952$d

The search is based on Zebra index acqdate
Comment 6 Owen Leonard 2013-11-14 18:45:21 UTC
My items do have accession date information, and search results can be correctly sorted by accession date, if that is any indication of the index working.
Comment 7 Zeno Tajoli 2013-11-14 19:49:31 UTC
I'm sorry for my bad english, but i don't understand the situation.
Is not present the bug in your installation ?
All work without problem ?

And your test version is ?

Thank you
Comment 8 Owen Leonard 2013-11-14 20:48:22 UTC
I do not see the bug in master. I do not get errors when searching by date.

However, I also get no results when searching by date.
Comment 9 Zeno Tajoli 2013-11-14 20:56:06 UTC
Last option:
do you use QueryParser ?
Because with QueryParser on the bug is not present.
See from master, labels/label-item-search.pl:

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 }

In fact line 97 [QueryParser on] is OK.
Line 100 [QueryParser off] has the bug
Comment 10 Owen Leonard 2013-11-15 13:52:12 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall (khall) 2013-11-22 16:07:16 UTC
Created attachment 23091 [details] [review]
Bug 11222 - A regression on label-item-search.pl done by Bug 9239
Comment 12 Galen Charlton 2013-11-23 20:06:07 UTC
*** Bug 10867 has been marked as a duplicate of this bug. ***
Comment 13 Galen Charlton 2013-11-23 20:08:31 UTC
Pushed to master.  Thanks, Zeno!

Unrelated to this patch, it appears that date accessioned searching from this form isn't working at all if QueryParser is on.
Comment 14 Galen Charlton 2013-11-23 20:30:19 UTC
I wrote up the issue with acquisition date searching when QueryParser is enabled in bug 11293.
Comment 15 Fridolin Somers 2013-12-13 08:55:43 UTC
This patch has been pushed to 3.14.x, will be in 3.14.1
Comment 16 Tomás Cohen Arazi (tcohen) 2013-12-23 15:13:17 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Zeno!