From 4df589a10f7d476eaff41c4eed59db5567dec21e Mon Sep 17 00:00:00 2001 From: Fridolin Somers 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" => Without patch you get no results => With patch you get expected results --- 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 57f3ff3..5b20224 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.7.4