Summary: | Issues on serial collection page sort from old to new now | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Serials | Assignee: | Aleisha Amohia <aleisha> |
Status: | Pushed to stable --- | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, david, jonathan.druart, kch-tr.lhl-consortium, michaela.sieber, paul.derscheid |
Version: | Main | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | Sponsored | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes the serial collection table so that issues now sort in descending order based on the date published column (the latest issue at the top).
|
|
Version(s) released in: |
25.05.00,24.11.05
|
Circulation function: | |
Attachments: |
Bug 39406: Make serial issues sort from new to old on collection page
Bug 39406: Make serial issues sort from new to old on collection page |
Description
Katrin Fischer
2025-03-21 09:51:51 UTC
Can you provide a commit id where it was working? I don't find anything in the git log that could cause a regression. I guess the following changes would fix the problem: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 67c39806aae..1e2f62b4746 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -361,7 +361,7 @@ } $(".subscription-year-table").kohaTable({ columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }], - order: [[0, "desc"]], + order: [[3, "desc"]], dom: "t", autoWidth: false, paginate: false, I compared it with the latest 22.11 version as that was, what I had at hand immediately. The sorting there is different. KIT who reported was using 23.11 before I believe. (In reply to Katrin Fischer from comment #2) > I compared it with the latest 22.11 version as that was, what I had at hand > immediately. The sorting there is different. KIT who reported was using > 23.11 before I believe. Yes we are using 23.11.06 and the order of serial issues is from new to old. We seems that the problem is the column 0 (which is the column with the checkboxes) As Jonathan mentioned this column should be sorted descending (which means it would be sorted by serialid desc) Maybe this is a bug in the new DataTables version because column 0 ist declared as not sortable? The new DataTables version was intruduced in Koha version 24.11 (see bug 36640) We suggest to sort the table by column 1, which is the date published. It should NOT be sorted by column 3 because this is the date received. To change the sorting to the publication date is comprehensible for users and it gives the user the opportunity to change the sorting of the serial issues by editing the Date published. Created attachment 182473 [details] [review] Bug 39406: Make serial issues sort from new to old on collection page This patch fixes the serial collection table to sort in descending order on the date published column. To test: 1. Create a subscription if you don't already have one. 2. Go to the Serial Collection tab using the left navigation. 3. Click the Generate Next button a bunch of times to generate some serial issues. Note that the issues are displaying in the table in ascending order, with the oldest date published at the top. 4. Apply the patch and refresh the page 5. Confirm the issues are now displaying in the table in descending order, with the newest date published at the top. 6. Click the Generate Next button again and confirm the issue is inserted at the top of the table. Sponsored-by: Pymble Ladies' College Great to see a patch here! :) Created attachment 182564 [details] [review] Bug 39406: Make serial issues sort from new to old on collection page This patch fixes the serial collection table to sort in descending order on the date published column. To test: 1. Create a subscription if you don't already have one. 2. Go to the Serial Collection tab using the left navigation. 3. Click the Generate Next button a bunch of times to generate some serial issues. Note that the issues are displaying in the table in ascending order, with the oldest date published at the top. 4. Apply the patch and refresh the page 5. Confirm the issues are now displaying in the table in descending order, with the newest date published at the top. 6. Click the Generate Next button again and confirm the issue is inserted at the top of the table. Sponsored-by: Pymble Ladies' College Signed-off-by: David Nind <david@davidnind.com> Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.05 |