Bug 20492

Summary: Add missing case for advanced search year limit in _fix_limit_special_cases
Product: Koha Reporter: David Gustafsson <glasklas>
Component: Searching - ElasticsearchAssignee: David Gustafsson <glasklas>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 - low CC: bibliwho, josef.moravec
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24807
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 20492: Add missing case for advanced search year limit

Description David Gustafsson 2018-03-29 09:57:35 UTC

    
Comment 1 David Gustafsson 2018-03-29 09:59:25 UTC
If choosing "more options" in advanced search, and using "year" limit, this will not be converted to elastic query syntax format. Added a case to fix this.
Comment 2 David Gustafsson 2018-03-29 10:15:42 UTC
Created attachment 73412 [details] [review]
Bug 20492: Add missing case for advanced search year limit

Add missing case for when using "year" limit in advanced search,
which results the zebra limit "yr,st-numeric=YYYY-YYYY".
This will now be convered to an ElasticSearch range.

How to test:
1) Perform a year limit search by choosing "More options" in
   advanced search page and enter a year range that should
   produce results.
2) This should not produce the expected results.
3) Apply patch
4) Perform the same search again, it should now produce the
   expected results.

Sponsored-by: Gothenburg University Library
Comment 3 Cab Vinton 2018-07-02 09:36:38 UTC
It would be helpful to know what specifically the ElasticSearch syntax format is supposed to look like.

Sandbox 13 is still showing "yr,st-numeric=YYYY-YYYY" for the Year limit search in both the OPAC & staff client.
Comment 4 David Gustafsson 2018-07-02 11:18:50 UTC
Yes, but it will be converted to the right format, so both formats are supported.
Comment 5 Josef Moravec 2019-03-01 09:08:59 UTC
Hi David, 

This does work, however only in OPAC, publication year in staff is not affected and still does not work in Elasticsearch

Also, I think the test for this change is needed...
Comment 6 Katrin Fischer 2020-09-20 22:33:36 UTC
I am not sure how this relates to bug 24807. I applied the patch and reindexed my records with -d, but the search in OPAC doesn't work for me. I did a date range search for "2000-", but almost all records are way before 2000, both in 008 and 260/264.
Comment 7 David Gustafsson 2021-09-06 15:19:41 UTC
Thing this have now been fixed in https://github.com/Koha-Community/Koha/commit/2293e6597c69d55ce5916b7a31029f13d65d4fea so closing this.
Comment 8 David Gustafsson 2021-09-06 15:20:58 UTC

*** This bug has been marked as a duplicate of bug 22524 ***