To replicate: 1. Turn on the Claims Returned feature by setting ClaimReturnedLostValue to 1 2. Change Koha's date format to UK format by setting DateFormat to dd/mm/yyyy 3. Check an item out to a patron 4. Note that the dates in the Check out screen are in UK format - dd/mm/yyyy 5. Claim the item as returned 6. Note that in the Claims tab, the date for 'Created on' is in US format mm/dd/yyyy 7. In the Claims tab, use the Actions button to mark the item as resolved. 8. Note that the 'Updated on' and 'Resolution' columns both show the date in US format - mm/dd/yyyy 9. Reload the Check out page for the patron and note that the 'Return claims' column correctly shows the date in UK format - dd/mm/yyyy
*** Bug 25117 has been marked as a duplicate of this bug. ***
bug 24999 took care of the checkouts tab, problems on claims tab remain: To test: - Create several claims for items checked out by a patron - Resolve one of them - Switch dateformat preference and verify the dates updated, created and resolved, don't display correctly
Created attachment 153783 [details] [review] 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.
Created attachment 154321 [details] [review] 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>
I'm not enough knowledgeable with the JS part to review it but about the template: why do we need a duplication of the lines with return-claim-created-on and return-claim-updated-on? It's definitely related to ``` "mDataProp": "created_on", "bVisible": false, ``` and it's counterpart for updated-on. And without the duplication in the template, the table breaks.
(In reply to Victor Grousset/tuxayo from comment #5) > why do we need a duplication of the lines with return-claim-created-on and > return-claim-updated-on? Each date column has a corresponding hidden column which contains the unformatted date which is used when sorting by that date. In the visible column we see the formatted date.
Oh okay :o No problem then. Crazy that it's identical and relies on position for which one to do what.
Created attachment 154532 [details] [review] 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>
All working as expected. I was surprised this wasn't an ajax table yet using the wrapper.. it would be nice to convert it at some point, then this column fun could go away as sorting works more clearly for those I believe. Passing QA
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.04
Nice work everyone! Pushed to oldstable for 22.11.x
This patch has created formatting and JS errors for the return claims on 22.11.10. Should we revert the patch on 22.11.x and I can attach a new patch for that branch? Or should I write a follow-up patch for 22.11.x?
Decided to attach the fix for 22.11.x to Bug 35112 so this commit won't need to be reverted.