Summary: | Date of birth sorting with British English format is broken | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Staff interface | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, gmcharlt, jonathan.druart, oleonard, sally.healey |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05
|
|
Circulation function: | |||
Bug Depends on: | 15400 | ||
Bug Blocks: | |||
Attachments: |
Bug 27926: Add 'title-string' for dates on circ-patron-results
Bug 27926: Add 'title-string' for dates on circ-patron-results Bug 27926: (QA follow-up) Switch to using data-order Bug 27926: Add 'title-string' for dates on circ-patron-results Bug 27926: (QA follow-up) Switch to using data-order |
Description
Martin Renvoize (ashimema)
2021-03-11 11:47:37 UTC
Created attachment 118118 [details] [review] Bug 27926: Add 'title-string' for dates on circ-patron-results This patch adds the title string sorting for the data of birth field in the circulation patron results table. This has the side effect of adding a tooltip that displays the date of birth in ISO format, so I'm not entirely sure it's the right approach. Test plan 1/ Set your date format preferences to British English (dd-mm-yyyy) 2/ Do a search that will yield multiple patrons via "Check out" 3/ Try sorting on date of birth and not the order is incorrect. 4/ Apply the patch 5/ Refresh the page and try sorting on date again 6/ The order should now be correct 7/ Signoff I'm not sure about the solution chosen here.. see the caveat in the commit message. We will also need to deal with the same issue on guarantor_search and members_results at least.. maybe more. Created attachment 118124 [details] [review] Bug 27926: Add 'title-string' for dates on circ-patron-results This patch adds the title string sorting for the data of birth field in the circulation patron results table. This has the side effect of adding a tooltip that displays the date of birth in ISO format, so I'm not entirely sure it's the right approach. Test plan 1/ Set your date format preferences to British English (dd-mm-yyyy) 2/ Do a search that will yield multiple patrons via "Check out" 3/ Try sorting on date of birth and not the order is incorrect. 4/ Apply the patch 5/ Refresh the page and try sorting on date again 6/ The order should now be correct 7/ Signoff Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Works for me with both DD/MM/YYYY and MM/DD/YYYY formats. Happy to test again once it's ready for sign off. OK, Going for pragmatic here.. I'm going to set this one to NSO and leave it as only fixing the circ search case. I'll open another bug for the other patron search results tables.. they're somewhat more complicated being old style ajax tables. Thanks Sally :) Created attachment 118181 [details] [review] Bug 27926: (QA follow-up) Switch to using data-order This patch switches away from using the title attribute for ordering and instead uses data-order which is supported in modern DataTables. This has the effect of allowing our ordering to continue to work but without adding the unwanted tooltip on hover. Test plan 1/ Ensure sorting is still working as expected 2/ Hover over any of the date of birth fields and note that you are not longer faced with a tooltip. 3/ Signoff Created attachment 119159 [details] [review] Bug 27926: Add 'title-string' for dates on circ-patron-results This patch adds the title string sorting for the data of birth field in the circulation patron results table. This has the side effect of adding a tooltip that displays the date of birth in ISO format, so I'm not entirely sure it's the right approach. Test plan 1/ Set your date format preferences to British English (dd-mm-yyyy) 2/ Do a search that will yield multiple patrons via "Check out" 3/ Try sorting on date of birth and not the order is incorrect. 4/ Apply the patch 5/ Refresh the page and try sorting on date again 6/ The order should now be correct 7/ Signoff Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 119160 [details] [review] Bug 27926: (QA follow-up) Switch to using data-order This patch switches away from using the title attribute for ordering and instead uses data-order which is supported in modern DataTables. This has the effect of allowing our ordering to continue to work but without adding the unwanted tooltip on hover. Test plan 1/ Ensure sorting is still working as expected 2/ Hover over any of the date of birth fields and note that you are not longer faced with a tooltip. 3/ Signoff Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Missing dependencies, not backported to 20.05 |