Bugzilla – Attachment 78906 Details for
Bug 20765
Search for items by acqdate does not work in label batch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20765: Fix search for items by acqdate in label batch
Bug-20765-Fix-search-for-items-by-acqdate-in-label.patch (text/plain), 2.74 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-09-15 22:29:40 UTC
(
hide
)
Description:
Bug 20765: Fix search for items by acqdate in label batch
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-09-15 22:29:40 UTC
Size:
2.74 KB
patch
obsolete
>From c4255b9e7f56b6128064247f56e006f4b2f829a4 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 14 May 2018 16:18:29 +0200 >Subject: [PATCH] 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. >--- > labels/label-item-search.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl >index 57f3ff3ea8..5b202245de 100755 >--- a/labels/label-item-search.pl >+++ b/labels/label-item-search.pl >@@ -88,7 +88,7 @@ if ( $op eq "do_search" ) { > "acqdate(" . $datefrom . '-)'; > } else { > $ccl_query .= ' and ' if $ccl_textbox; >- $ccl_query .= "acqdate,st-date-normalized,ge=" . $datefrom; >+ $ccl_query .= "acqdate,ge,st-date-normalized=" . $datefrom; > } > } > } >@@ -102,7 +102,7 @@ if ( $op eq "do_search" ) { > $ccl_query .= "acqdate(-" . $dateto . ')'; > } else { > $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom ); >- $ccl_query .= "acqdate,st-date-normalized,le=" . $dateto; >+ $ccl_query .= "acqdate,le,st-date-normalized=" . $dateto; > } > } > } >-- >2.19.0
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 20765
:
75306
|
76581
| 78906