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> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
20cba0d295
commit
f32ee27deb
1 changed files with 17 additions and 3 deletions
|
@ -310,7 +310,14 @@ $(document).ready(function() {
|
||||||
return oObj.homebranch.escapeHtml();
|
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 ) {
|
"mDataProp": function ( oObj ) {
|
||||||
return oObj.branchname.escapeHtml();
|
return oObj.branchname.escapeHtml();
|
||||||
|
@ -562,7 +569,7 @@ $(document).ready(function() {
|
||||||
"bVisible": false,
|
"bVisible": false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iDataSort": 1, // Sort on hidden unformatted date due column
|
"iDataSort": 0, // Sort on hidden unformatted date due column
|
||||||
"mDataProp": function( oObj ) {
|
"mDataProp": function( oObj ) {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var due = new Date( oObj.date_due );
|
var due = new Date( oObj.date_due );
|
||||||
|
@ -646,7 +653,14 @@ $(document).ready(function() {
|
||||||
return ( oObj.location ? oObj.location.escapeHtml() : '' );
|
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 ) {
|
"mDataProp": function ( oObj ) {
|
||||||
return oObj.branchname.escapeHtml();
|
return oObj.branchname.escapeHtml();
|
||||||
|
|
Loading…
Reference in a new issue