Bug 40667 - Koha does not sort local cover images the same for for staff/OPAC detail pages
Summary: Koha does not sort local cover images the same for for staff/OPAC detail pages
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-18 16:57 UTC by Lucas Gass (lukeg)
Modified: 2025-08-18 16:57 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-08-18 16:57:49 UTC
In OPAC detail:

$template->param( localimages => $biblio->cover_images );

We get local images in no particular order. 

In Staff detail:

    $template->param(
        localimages =>
            $biblio->cover_images->search( {}, { order_by => [ \"COALESCE(itemnumber, 0, 1)", 'timestamp' ] } ),
    );

We order the images, first by itemnumber and secondary sort on timestamp. 


These should be the same so that the images appear the same in both staff/OPAC.