Bug 15400 added an include to always output date of birth properly formatted via $KohaDates and with `(age XX)` appended. This has broken the sorting in some tables; for example the patron selection table when searching for a patron for circulation.
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