Bug 42973: Restore manual ordering for news
To test: 1. Create four OPAC news items: - "Pinned news item" with "Appear in position" = 1 and an older publication date. - "Newest unnumbered news item" with no position and the newest publication date. - "Middle unnumbered news item" with no position and an intermediate publication date. - "Oldest unnumbered news item" with no position and the oldest publication date. 2. View the OPAC main page. 3. Confirm the news items are ordered by publication date, with the newest item first. Apply the patch. 4. Reload the OPAC main page. 5. Confirm the manually positioned news item appears first. 6. Confirm the remaining news items are ordered by publication date descending. 7. Confirm news items without an "Appear in position" value continue to display newest first. 8. Sign off and have a wonderful day! Signed-off-by: Gretchen Maxeiner <MaxeinerGL@gcc.edu> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
a859898aba
commit
2c29581606
|
|
@ -115,7 +115,11 @@ sub search_for_display {
|
|||
|
||||
my $attribs = {
|
||||
prefetch => 'additional_content',
|
||||
order_by => { -desc => 'additional_content.published_on' }
|
||||
order_by => [
|
||||
\['ISNULL(additional_content.number)'],
|
||||
{ -asc => 'additional_content.number' },
|
||||
{ -desc => 'additional_content.published_on' },
|
||||
],
|
||||
};
|
||||
return Koha::AdditionalContentsLocalizations->search( $search_params, $attribs );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue