Bug 37218 - Sorting by publication date works unexpectedly in UNIMARC
Summary: Sorting by publication date works unexpectedly in UNIMARC
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 10:34 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2024-07-03 10:54 UTC (History)
1 user (show)

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


Attachments
Bug 37218: Sorting by publication date works unexpectedly in UNIMARC (1.37 KB, patch)
2024-07-03 10:54 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2024-06-28 10:34:52 UTC
Sorting by publication date sorts the list by field biblio.copyrightdate which is not bound with an UNIMARC field.

I am not sure about the fix. Should we check the marc flavour to determine if we sort by biblio.copyrightdate and biblioitems.publicationyear ?
Comment 1 Baptiste Wojtkowski (bwoj) 2024-07-03 10:54:52 UTC
Created attachment 168437 [details] [review]
Bug 37218: Sorting by publication date works unexpectedly in UNIMARC

Steps to reproduce:
1 - Open a Koha with syspref "UNIMARC" set
2 - Search for items
3 - Sort by publication date -> there should be no change whatever you
  do

In my previous comment, I had not noticed that this is clearly a bug:
the results from search are put in the field "copyrightdate" whatever
the MARC flavour so the line checking for marcflavour to pick the sort
field is obsolete

TEST PLAN:
1 - Open a Koha with syspref "UNIMARC" set
2 - Search for items
3 - Sort by publication date -> there should be no change whatever you
  do
4 - Apply patch and repeat 2&3 -> items should be changed