Bug 37434

Summary: Lists are incorrectly sorted in UNIMARC
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: ListsAssignee: Bugs List <koha-bugs>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC

Description Baptiste Wojtkowski (bwoj) 2024-07-23 14:53:11 UTC
In UNIMARC, when creating a list using sort by copyrightdate, it sorts using the MARC21 field "copyrightdate", which is not existing in UNIMARC.

Note: the inventory search uses the field publicationyear to sort, which is the correct field to use here.
Comment 1 Baptiste Wojtkowski (bwoj) 2024-07-31 12:48:25 UTC Comment hidden (obsolete)
Comment 2 Baptiste Wojtkowski (bwoj) 2024-07-31 13:07:39 UTC Comment hidden (obsolete)
Comment 3 Baptiste Wojtkowski (bwoj) 2024-07-31 13:16:25 UTC Comment hidden (obsolete)
Comment 4 Baptiste Wojtkowski (bwoj) 2024-07-31 13:17:55 UTC Comment hidden (obsolete)
Comment 5 Baptiste Wojtkowski (bwoj) 2024-07-31 14:04:28 UTC Comment hidden (obsolete)
Comment 6 Baptiste Wojtkowski (bwoj) 2024-07-31 14:05:36 UTC Comment hidden (obsolete)
Comment 7 Baptiste Wojtkowski (bwoj) 2024-08-02 11:53:22 UTC Comment hidden (obsolete)
Comment 8 Baptiste Wojtkowski (bwoj) 2024-08-02 12:03:21 UTC
Created attachment 169998 [details] [review]
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC

TEST PLAN (on an UNIMARC machine):
1 - Create a list with items with different publicationyear if you do not have one.
2 - Edit the list and select "copyrightdate as date"
3 - See they are not sorted by date
4 - Apply patch
5 - See they are now sorted by date.

Note: The transformation of copyrightdate before loading the template is
only useful if the list is sorted by copyrightdate, which is quite
inconsistent but is actual for every Kohas at the moment.
Comment 9 Roman Dolny 2024-08-22 19:30:47 UTC
Created attachment 170614 [details] [review]
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC

TEST PLAN (on an UNIMARC machine):
1 - Create a list with items with different publicationyear if you do not have one.
2 - Edit the list and select "copyrightdate as date"
3 - See they are not sorted by date
4 - Apply patch
5 - See they are now sorted by date.

Note: The transformation of copyrightdate before loading the template is
only useful if the list is sorted by copyrightdate, which is quite
inconsistent but is actual for every Kohas at the moment.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>