Bugzilla – Attachment 181577 Details for
Bug 39757
Serial enumeration / chronology sorting is broken again in biblio page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39757: Fix default sort order
Bug-39757-Fix-default-sort-order.patch (text/plain), 2.43 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-04-28 08:54:15 UTC
(
hide
)
Description:
Bug 39757: Fix default sort order
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-04-28 08:54:15 UTC
Size:
2.43 KB
patch
obsolete
>From b2f1f850bef36229ac932382d3f7e7b96ae214bc Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Mon, 28 Apr 2025 10:50:08 +0200 >Subject: [PATCH] Bug 39757: Fix default sort order > >Test plan: >1 - Have a notice with mutliple serials received on different days, notice > they are not sorted by date by default >2 - Have a non-serial notice, notice there is no sort order >3 - Apply patch >4 - Go to the serials notice -> it is well ordered (by acquisition date) >5 - Go to the non-serial notice -> is is sorted by accession date > >Note: I picked accession date because it is how it works in >Koha::Item::search_ordered which is not used anymore for this purpose. >--- > .../html_helpers/tables/items/catalogue_detail.inc | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 84451e0a..1fe6a527 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -320,7 +320,16 @@ > > var items_table = $("#" + tab_id + '_table').kohaTable({ > ajax: { url: item_table_url }, >- order: [], >+ order: [ >+ { >+ name: 'enumchron', >+ dir: 'desc' >+ }, >+ { >+ name: 'dateaccessioned', >+ dir: 'desc' >+ }, >+ ], > embed, > autoWidth: false, > bKohaColumnsUseNames: true, >@@ -453,6 +462,7 @@ > { > data: "me.serial_issue_number", > className: "enumchron", >+ name: "enumchron", > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >@@ -623,6 +633,7 @@ > data: "me.acquisition_date", > type: "date", > className: "dateaccessioned", >+ name: "dateaccessioned", > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39757
: 181577