Koha-clms/labels
Fridolin Somers b610d6c95c Bug 20765: Fix search for items by acqdate in label batch
In Tools >  Label creator, when creating a batch you can add items using a search.

This search has filters on acquisition date.
Actually those filters does not work.
The create a search using CCL syntaxe to query Zebra search engine.

The cause is that operator "ge" or "le" must be before "st-date-normalized" in CCL query.
Looks like it is because of "st-date-normalized" uses "r=o" in ccl.properties.

Test plan :
1) Check in advance search you have indexed acquisition date
2) Go to Tools > Label creator
3) Click on New > Label batch
4) Click on Add item(s)
5) Enter a relevent date in "Added on or after date" and in "Added on or before date"
6) Click on "Search"
=> SUCCESS: You get results
7) Apply the patch
8) Retry the 'Add item(s)' step
=> SUCCESS: Patch doesn't change behaviour for old Zebra
9) Get rid of the patch on your working branch
10) Use the latest Zebra:
- /etc/apt/sources.list.d/indexdata.list:
deb http://ftp.indexdata.dk/debian jessie main
- Add the repo key:
  $ wget http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add -
- Upgrade:
  $ sudo apt update; sudo apt dist-upgrade
  $ sudo koha-rebuild-zebra -f -a -b -v kohadev
  $ restart_all
11) Retry the 'Add item(s)' step
=> FAIL: No results!
9) Apply the patch, retry
=> SUCCESS: Search results!
- Sign off :-D

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It doesn't break with 2.0.59-1 (stretch/jessie), and fixes the problem
for 2.1.X.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a6f8eac4ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 06f0209840)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-24 11:52:13 +02:00
..
label-create-csv.pl Bug 16154: CGI->multi_param - Assign a list 2016-04-26 23:16:43 +00:00
label-create-pdf.pl Bug 16154: CGI->multi_param - Assign a list 2016-04-26 23:16:43 +00:00
label-create-xml.pl Bug 16154: CGI->multi_param - Assign a list 2016-04-26 23:16:43 +00:00
label-edit-batch.pl Bug 17301: Follow-up - Standardize headings 2016-09-25 15:49:10 +00:00
label-edit-layout.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
label-edit-profile.pl Bug 18535 - Clicking 'edit printer profile' in label creator causes software error 2017-05-12 08:52:31 -04:00
label-edit-template.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
label-home.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
label-item-search.pl Bug 20765: Fix search for items by acqdate in label batch 2018-09-24 11:52:13 +02:00
label-manage.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
label-print.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
spinelabel-home.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
spinelabel-print.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00