Bugzilla – Attachment 154532 Details for
Bug 25023
Claims returned dates not formatted according to dateformat preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25023: Claims returned dates not formatted according to dateformat preference
Bug-25023-Claims-returned-dates-not-formatted-acco.patch (text/plain), 3.99 KB, created by
Martin Renvoize (ashimema)
on 2023-08-17 11:08:02 UTC
(
hide
)
Description:
Bug 25023: Claims returned dates not formatted according to dateformat preference
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-08-17 11:08:02 UTC
Size:
3.99 KB
patch
obsolete
>From 2035b22e2593f16ac5486c9a138fb044a0af16e2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 Jul 2023 11:38:32 +0000 >Subject: [PATCH] Bug 25023: Claims returned dates not formatted according to > dateformat preference > >This patch updates the code for rendering the claims returned table on >the checkout and patron detail pages. Now the dates are formatted using >the global js-date-format.inc code. > >To test, apply the patch and make sure the claims returned feature is >enabled by setting a value in the ClaimReturnedLostValue system >preference. > >- Check out some items to a patron. >- Under the checkouts tab, mark several checkouts as "Claim returned." >- Open the claims tab. >- The dates in the "Created on" column should be formatted according to > your dateformat system preference. > - Change the dateformat preference and return to the checkouts page. > Confirm that the claims tab shows dates formatted correctly. >- The "created on" and "updated on" columns should sort correctly with > any dateformat setting. You may have to directly modify the dates in > the database in order to have the right data for testing this. > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/includes/patron-return-claims.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 20 +++++++++++++++---- > 2 files changed, 18 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc >index 3b90d3497c..c0b40e6806 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc >@@ -15,6 +15,8 @@ > <th class="return-claim-record-title anti-the">Title</th> > <th class="return-claim-notes">Notes</th> > <th class="return-claim-created-on">Created on</th> >+ <th class="return-claim-created-on">Created on</th> >+ <th class="return-claim-updated-on">Updated on</th> > <th class="return-claim-updated-on">Updated on</th> > <th class="return-claim-resolution">Resolution</th> > <th class="return-claim-actions NoSort"> </th> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 9836a960d0..3ed706fa7e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -989,16 +989,28 @@ $(document).ready(function() { > } > }, > { >+ "mDataProp": "created_on", >+ "bVisible": false, >+ }, >+ { >+ "orderData": 4, > "mDataProp": function ( oObj ) { >- let created_on = new Date( oObj.created_on ); >- return created_on.toLocaleDateString(); >+ if ( oObj.created_on ) { >+ return $date(oObj.created_on, { no_tz_adjust: true });; >+ } else { >+ return ""; >+ } > } > }, > { >+ "mDataProp": "updated_on", >+ "bVisible": false, >+ }, >+ { >+ "orderData": 6, > "mDataProp": function ( oObj ) { > if ( oObj.updated_on ) { >- let updated_on = new Date( oObj.updated_on ); >- return updated_on.toLocaleDateString(); >+ return $date(oObj.updated_on, { no_tz_adjust: true }); > } else { > return ""; > } >-- >2.41.0
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 25023
:
153783
|
154321
| 154532