[Bug 39027] New: News are order with older on top
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Bug ID: 39027 Summary: News are order with older on top Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: marion.durand@biblibre.com QA Contact: testopia@bugs.koha-community.org When a news is created, it is displayed last in the news list at the OPAC. You can change that behaviors by using the field 'Number' to order them manually but then, you have to manually edit all news to add a new one first. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- It looks like the sort by "Number" is hard-coded, so we'd have to update the code to offer alternatives. I think it would be logical to add the option of sorting by date ascending or date descending. I'm not sure how you'd handle sorting first by number and then by date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 177588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177588&action=edit Bug 39027: Order news on opac-main.pl by publication date instead of ID On the OPAC, news should rather be ordered by the publication date than by the creation date (~ id): a user want to see last published news first and not last created news, regardless of their publication date TEST PLAN: 1 - Create 3 news, have the 3 news published in an order different from their id (for example news 1 => 2020, news 2 => 2025, news 3 => 2023) 2 - Go on http://youropac/cgi-bin/koha/opac-main.pl -> news are ordered by ID APPLY PATCH 3 - Repeat 2 -> news are ordered by Date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |baptiste.wojtkowski@biblibr | |e.com CC| |baptiste.wojtkowski@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- @Owen, oh sry I did not see your comment before publishing How would the sort be chosen ? By a syspref ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|News are order with older |News are ordered with |on top |oldest on top -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Oliver Behnke <oliver.behnke@aei.mpg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oliver.behnke@aei.mpg.de --- Comment #4 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- Can we expand this issue to cover the staff interface as well? News can be displayed in both places and it suffers from that problem as well. Honestly, sorting by publish date ascending doesn't make any sense to me, so one could even think about changing the default to descending :) If not, then a syspref would be much appreciated. Cheers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Normally, for a news site, you would want to see the latest news item at the top (well, I would anyway). But I also understand that this may not suit everyone, and how different libraries use the news feature. How about a link/button to sort by latest or earliest? Not sure how to do this and make it look nice. But then this would muck up the numbered option that you can set, which is also used for HTML customisations. If sorting by "Appear in position" is not used, then it shouldn't be shown on the form. I guess "we" will have to choose! So maybe the logic would be: 1. If there is an "Appear in position" value, show in the order specified. 2. If some "Appear in position" values, show in the specified order then by date published with the latest first. 3. If there is no "Appear in position" values, sort with the latest item first (published date). 4. Have a link to sort by latest/oldest. 5. Something else? 6. Give up and leave Current behavour for news: 1. If no "Appear in position", news is displayed by the creation date, with the earliest date first (?). 2. Use "Appear in position" to sort in your preferred order. 3. If "Appear in position" is only used on some items, sorts in descending order (2, 1, ...) with ones without after this in the date created order. Behavour after the patch for both OPAC and staff interface: 1. Displayed by published date, with the oldest at the top and the latest at the bottom. Changing status to in discussion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #6 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- I think I'd prefer a syspref to define the default order (publish data asc/desc). If there's an override via "Appear in position" then respect that. What I don't like is a link/button to change the order interactively, *if* users have to click it every time - i.e. due to a lacking desired default. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Tbh I don't see any use case for an order from oldest to newest, as well as our product owner, and I feel like this will be an unused syspref. Atm, the sorting by number works if there is a number, right ? Maybe I can propose a patch that adds the syspref and we push it only if some customers need it ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #8 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- That's an option. But most importantly the current default needs to be reversed and we should probably focus on that first to get this issue resolved. It seems we all agree that the default order should be decending. Cheers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #9 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- To summarize: sort by publication date decending by default. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #10 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- I set the patch back to NSO then -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 190788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190788&action=edit Before and after screenshots I tested again. Currently, for both the OPAC and staff interface, the news appear to be ordered by the latest published news item at the top, which is what I'd expect. With the patch, which still applies, it is now ordering the other way for me. That is, the earliest news item first. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- In my test, without the patch news items are sorted by ID. With the patch items are sorted by publication date ascending, so the oldest items are on top. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #177588|0 |1 is obsolete| | --- Comment #13 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 191251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191251&action=edit Bug 39027: Order news on opac-main.pl by publication date instead of ID On the OPAC, news should rather be ordered by the publication date than by the creation date (~ id): a user want to see last published news first and not last created news, regardless of their publication date TEST PLAN: 1 - Create 3 news, have the 3 news published in an order different from their id (for example news 1 => 2020, news 2 => 2025, news 3 => 2023) 2 - Go on http://youropac/cgi-bin/koha/opac-main.pl -> news are ordered by ID APPLY PATCH 3 - Repeat 2 -> news are ordered by Date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 mercury@coffee.geek.nz changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 mercury@coffee.geek.nz changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191251|0 |1 is obsolete| | --- Comment #14 from mercury@coffee.geek.nz --- Created attachment 191823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191823&action=edit Bug 39027: Order news on opac-main.pl by publication date instead of ID On the OPAC, news should rather be ordered by the publication date than by the creation date (~ id): a user want to see last published news first and not last created news, regardless of their publication date TEST PLAN: 1 - Create 3 news, have the 3 news published in an order different from their id (for example news 1 => 2020, news 2 => 2025, news 3 => 2023) 2 - Go on http://youropac/cgi-bin/koha/opac-main.pl -> news are ordered by ID APPLY PATCH 3 - Repeat 2 -> news are ordered by Date Signed-off-by: Mercury <mercury@coffee.geek.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |Laura.escamilla@bywatersolu |y.org |tions.com Status|Signed Off |Passed QA --- Comment #15 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Tested with multiple news items having varying publication dates. Verified that items are now ordered by published_on DESC on the OPAC main page. Also tested items with identical publication dates — ordering is currently not deterministic in that case. Suggestion (non-blocking): consider adding a secondary sort (e.g. number DESC) to ensure stable ordering when publication dates are equal. Otherwise, patch behaves as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191823|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #16 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 196498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196498&action=edit Bug 39027: Order news on opac-main.pl by publication date instead of ID On the OPAC, news should rather be ordered by the publication date than by the creation date (~ id): a user want to see last published news first and not last created news, regardless of their publication date TEST PLAN: 1 - Create 3 news, have the 3 news published in an order different from their id (for example news 1 => 2020, news 2 => 2025, news 3 => 2023) 2 - Go on http://youropac/cgi-bin/koha/opac-main.pl -> news are ordered by ID APPLY PATCH 3 - Repeat 2 -> news are ordered by Date Signed-off-by: Mercury <mercury@coffee.geek.nz> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #17 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Please backport to 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #19 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #20 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 25.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 Hannah, Derby Public Library <hannaha@derbylibrary.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hannaha@derbylibrary.com --- Comment #21 from Hannah, Derby Public Library <hannaha@derbylibrary.com> --- News is showing in chronological order, and the overridden priorities are not being used. Our library uses the news section to keep track of current book club books, but we like to have our Aspen interface pinned to the top for staff to have easy access. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #22 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Hannah, Derby Public Library from comment #21)
News is showing in chronological order, and the overridden priorities are not being used. Our library uses the news section to keep track of current book club books, but we like to have our Aspen interface pinned to the top for staff to have easy access.
Hi Hannah, can you please open a new bug report for this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42973 --- Comment #23 from David Nind <david@davidnind.com> --- (In reply to Aleisha Amohia from comment #22)
(In reply to Hannah, Derby Public Library from comment #21)
News is showing in chronological order, and the overridden priorities are not being used. Our library uses the news section to keep track of current book club books, but we like to have our Aspen interface pinned to the top for staff to have easy access.
Hi Hannah, can you please open a new bug report for this?
A fix for this waiting for sign off is on Bug 42973 - Additional contents ordering ignores "Appear in position" when sorting news. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39027 --- Comment #24 from David Nind <david@davidnind.com> --- (In reply to David Nind from comment #23)
(In reply to Aleisha Amohia from comment #22)
(In reply to Hannah, Derby Public Library from comment #21)
News is showing in chronological order, and the overridden priorities are not being used. Our library uses the news section to keep track of current book club books, but we like to have our Aspen interface pinned to the top for staff to have easy access.
Hi Hannah, can you please open a new bug report for this?
A fix for this waiting for sign off is on Bug 42973 - Additional contents ordering ignores "Appear in position" when sorting news.
Update: now signed off -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org