Bugzilla – Attachment 81090 Details for
Bug 21562
Sorting on checkout date is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21562: Fix sort by checkout date in the circulation table
Bug-21562-Fix-sort-by-checkout-date-in-the-circula.patch (text/plain), 2.94 KB, created by
Alex Buckley
on 2018-10-24 20:46:41 UTC
(
hide
)
Description:
Bug 21562: Fix sort by checkout date in the circulation table
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-10-24 20:46:41 UTC
Size:
2.94 KB
patch
obsolete
>From d1a121e76442b99dea27720ff82a423314d81bc5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 22 Oct 2018 16:51:25 -0300 >Subject: [PATCH] Bug 21562: Fix sort by checkout date in the circulation table > >The sort is done in SQL but resort by DataTables when displaying the >results. >iDataSort should be used to mimick date_due sort behavior. > >Test plan: >- Check some items out >- Modify the checkout and due dates, like: > 2018-10-22 > 2018-01-23 > 2018-05-27 >- Sort by checkout date, then due date. The sort should be correct for >all values of the DateFormat syspref > >Followed test plan, patch works as described and passes QA test tool > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index b964a9c..c4f1f35 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -310,7 +310,14 @@ $(document).ready(function() { > return oObj.homebranch.escapeHtml(); > } > }, >- { "mDataProp": "issuedate_formatted" }, >+ { >+ "mDataProp": "issuedate", >+ "bVisible": false, >+ }, >+ { >+ "iDataSort": 9, // Sort on hidden unformatted issuedate column >+ "mDataProp": "issuedate_formatted", >+ }, > { > "mDataProp": function ( oObj ) { > return oObj.branchname.escapeHtml(); >@@ -562,7 +569,7 @@ $(document).ready(function() { > "bVisible": false, > }, > { >- "iDataSort": 1, // Sort on hidden unformatted date due column >+ "iDataSort": 0, // Sort on hidden unformatted date due column > "mDataProp": function( oObj ) { > var today = new Date(); > var due = new Date( oObj.date_due ); >@@ -646,7 +653,14 @@ $(document).ready(function() { > return ( oObj.location ? oObj.location.escapeHtml() : '' ); > } > }, >- { "mDataProp": "issuedate_formatted" }, >+ { >+ "mDataProp": "issuedate", >+ "bVisible": false, >+ }, >+ { >+ "iDataSort": 7, // Sort on hidden unformatted issuedate column >+ "mDataProp": "issuedate_formatted", >+ }, > { > "mDataProp": function ( oObj ) { > return oObj.branchname.escapeHtml(); >-- >2.1.4
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 21562
:
80988
|
81090
|
81294