Bug 14908 - Item search: Item search results not properly sorted by Date. Date filter also not working
Summary: Item search: Item search results not properly sorted by Date. Date filter als...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 11425
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-28 09:40 UTC by Theodoros Theodoropoulos
Modified: 2020-11-30 21:44 UTC (History)
3 users (show)

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


Attachments
Item search result sorted by date and the same result screen when applying a date filter (appologies for the Greek characters) (146.21 KB, image/jpeg)
2015-09-28 09:40 UTC, Theodoros Theodoropoulos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Theodoros Theodoropoulos 2015-09-28 09:40:14 UTC
Created attachment 42905 [details]
Item search result sorted by date and the same result screen when applying a date filter (appologies for the Greek characters)

It seems that when sorting item search results by date, the order is not correct.
For example an item from 1998 appears between two items from 1996, 2015 appears between 1993 and 1996, etc

Even worse, if you enter a date (that appears in the result list) in the date 'filter', no rows are returned. 

See also the attached image showing these findings.
Comment 1 Jonathan Druart 2015-09-28 10:54:49 UTC
I have the same issue here, I suspect it comes from the fact that biblioitems.publicationyear is not correctly mapped to a MARC field.
Comment 2 Katrin Fischer 2015-09-29 21:46:34 UTC
Hi Jonathan,
MARC21 is using copyrightyear instead of publicationyear like UNIMARC - we need to make both fields work equally, as we do in other places. This might even get more important as now with RDA the year can be in 260 or 264... (thinking about mapping one to each...)
Comment 3 Fridolin Somers 2016-05-13 14:33:59 UTC
Corrected by Bug 14636 ?
Comment 4 Theodoros Theodoropoulos 2016-05-13 20:00:55 UTC
Indeed Fridolin, the ordering by date seems to be fixed in 3.20.8+
Thank you all for the great work!

Having said that, filtering by date, still doesn't seem to work.
For example, if you enter a date (that appears in the items results) in the date filter, you get no results at all. I've checked it with v3.20.10

Can you reproduce it?
Comment 5 Fridolin Somers 2016-06-27 11:52:21 UTC
(In reply to Theodoros Theodoropoulos from comment #4)
> Indeed Fridolin, the ordering by date seems to be fixed in 3.20.8+
> Thank you all for the great work!
> 
> Having said that, filtering by date, still doesn't seem to work.
> For example, if you enter a date (that appears in the items results) in the
> date filter, you get no results at all. I've checked it with v3.20.10
> 
> Can you reproduce it?

Does it work on master ?
Comment 6 Owen Leonard 2016-06-27 12:20:46 UTC
> (In reply to Theodoros Theodoropoulos from comment #4)
> > Having said that, filtering by date, still doesn't seem to work.
> > For example, if you enter a date (that appears in the items results) in the
> > date filter, you get no results at all. I've checked it with v3.20.10

In my tests in master filtering using the column header forms doesn't work at all for any column.
Comment 7 Theodoros Theodoropoulos 2016-06-27 12:30:12 UTC
@Fridolin: Yes the bug is still there on master, HOWEVER it only applies to MARC21 databases.

Steps to reproduce:
1/ Connect to MARC21-based Koha Demo server: http://koha.adminkuhn.ch:8001  [user:bebu / password:bebu]
2/ Go to Items Search and click search (with empty string). You'll get two results.
3/ Select one of the two returned dates to filter results
4/ You get no results at all

FYI, if you try to do the same think with UNIMARC-based Koha Demo server (ie http://intranet-demo.biblibre.com/   [user:test / password:test] everything works as expected.
Comment 8 Theodoros Theodoropoulos 2016-06-27 12:48:30 UTC
@Owen: For me, all the other filters seem to work properly. (Tested with 16.05.x and 3.20.x)
Comment 9 Katrin Fischer 2020-01-08 07:08:18 UTC
This appears to have been fixed - just tested date filtering on master.