Bug 6402

Summary: Lists sorted by year appear to be empty
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ListsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, chrish, katrin.fischer
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/opac-shelves.pl?viewshelf=X&sortfield=year
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 3229    
Attachments: Proposed fix
Signed off patch

Description Owen Leonard 2011-05-24 16:10:14 UTC
If you create a list, populate it with titles, and then change the sort to "year" it will appear as if your list is empty. The SQL in VirtualShelves.pm's GetShelfContents tries to accept "year" as a sort by but 'year' is not a valid column name.
Comment 1 Owen Leonard 2011-05-24 16:13:20 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2011-05-25 06:18:02 UTC
Created attachment 4254 [details] [review]
Signed off patch
Comment 3 Chris Cormack 2011-06-10 00:17:05 UTC
Easy to test fix, pushed please test on master
Comment 4 Owen Leonard 2011-10-27 20:13:23 UTC
This is fixed as far as making the list display, but at least with my data the sort doesn't actually work: It's trying to sort by biblioitems.publicationyear. biblioitems.publicationyear is empty because in the default MARC21 mapping publicationyear isn't mapped to anything.
Comment 5 Chris Hall 2012-06-27 01:39:36 UTC
I have uploaded a possible fix for Owen's bug to bug8323