Bug 37434 did address the problem of lists incorrectly sorted for Intranet. We also need to address it for the OPAC Steps to reproduce : 1 - Log in to an UNIMARC instance of Koha 2 - Create a public list with items with different publication date and sort it by publication date 3 - Go to the OPAC and click on List -> <your list> It should be unordered
Created attachment 181500 [details] [review] Bug 39148: Correct sort by publicationdate in OPAC lists Test plan (UNIMARC): 1 - Create a list with different publicationdates, chose to sort it by copyright gate 2 - Go to the list in the OPAC -> it is not correctly sorted 3 - Pick sort order: copyright date -> not correctly sorted 4 - Apply patch 5 - Retry 2&3 and see it works
It works as described in test plan, but comparison operators need to be adjust to string -- plack-opac-error.log says: [2025/04/25 11:53:37] [WARN] Argument "copyrightdate" isn't numeric in numeric eq (==) at /kohadevbox/koha/opac/opac-shelves.pl. [2025/04/25 11:53:37] [WARN] Argument "title" isn't numeric in numeric eq (==) at /kohadevbox/koha/opac/opac-shelves.pl line 3. [2025/04/25 11:53:37] [WARN] Argument "UNIMARC" isn't numeric in numeric eq (==) at /kohadevbox/koha/opac/opac-shelves.pl line3. [2025/04/25 11:53:37] [WARN] Argument "UNIMARC" isn't numeric in numeric eq (==) at /kohadevbox/koha/opac/opac-shelves.pl line3.
Created attachment 181508 [details] [review] Bug 39148: Correct sort by publicationdate in OPAC lists Test plan (UNIMARC): 1 - Create a list with different publicationdates, chose to sort it by copyright gate 2 - Go to the list in the OPAC -> it is not correctly sorted 3 - Pick sort order: copyright date -> not correctly sorted 4 - Apply patch 5 - Retry 2&3 and see it works
Created attachment 181527 [details] [review] Bug 39148: Correct sort by publicationdate in OPAC lists Test plan (UNIMARC): 1 - Create a list with different publicationdates, chose to sort it by copyright gate 2 - Go to the list in the OPAC -> it is not correctly sorted 3 - Pick sort order: copyright date -> not correctly sorted 4 - Apply patch 5 - Retry 2&3 and see it works Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 182257 [details] [review] Bug 39148: Correct sort by publicationdate in OPAC lists Test plan (UNIMARC): 1 - Create a list with different publicationdates, chose to sort it by copyright gate 2 - Go to the list in the OPAC -> it is not correctly sorted 3 - Pick sort order: copyright date -> not correctly sorted 4 - Apply patch 5 - Retry 2&3 and see it works Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Pushed for 25.05! Well done everyone, thank you!