Bug 8323 - User created lists not sorting properly
Summary: User created lists not sorting properly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low trivial (vote)
Assignee: Chris Hall
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-27 01:37 UTC by Chris Hall
Modified: 2013-12-05 19:59 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Fixing year sorting of OPAC lists (1.03 KB, patch)
2012-06-27 01:38 UTC, Chris Hall
Details | Diff | Splinter Review
[SIGNED-OFF] bug 8323 fixing year sorting of a list (1.65 KB, patch)
2012-06-27 09:41 UTC, Marc Véron
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hall 2012-06-27 01:37:09 UTC
Sorting by year in opac lists doesn't work due to trying to use biblioitems.publicationyear which is not mapped in the default MARC21 mapping.

My patch passes through the sorting field and will change 'year' to 'copyrightdate' to instead sort by biblio.copyrightdate (marc 260$c).

Patch incoming (have to get bug number first).
Comment 1 Chris Hall 2012-06-27 01:38:33 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2012-06-27 09:41:16 UTC
Created attachment 10537 [details] [review]
[SIGNED-OFF] bug 8323 fixing year sorting of a list

Signed-off-by: Marc Veron <veron@veron.ch>

Works as expected.

Caveat: If you edit the list in Opac, change the sort and then klick 'Save',
the List always is displayed in title order. This is du to the fact that
save calls opac-shelves.pl?viewshelf=4 without the sort parameter (defaults
to 'title').
If you go back to lists, choose the list from List name, the param is
correct and the list displays in expected order.

It took quite a time to track  that down, I first thought that opac-shelves.pl
was broken.

However, current bug 8323 is not affected, signing off.

Marc
Comment 3 Marc Véron 2012-06-27 09:58:25 UTC
Opend a bug for wrong sort order just after editing (8324).
Comment 4 Paul Poulain 2012-07-06 15:09:53 UTC
QA comment:
 * Having to do $sortfield eq 'year' ? 'copyrightdate' : $sortfield proves that there's something wrong in the parameters. It's not in the scope of this patch to fix this, but if you want to provide a follow-up to have 'copyrightdate' in $sortfield instead of year, you'll be welcomed !

Otherwise, tiny patch, passes QA
Comment 5 Chris Cormack 2012-07-07 03:11:41 UTC
Pushed to 3.8.x, will be in 3.8.3