Many templates call dt_add_type_uk_date() to handle sorting of date columns in tables when the dateformat system preference is set to "metric." Some of these templates already use the "title-string" method (http://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference) for sorting, and the call can be removed. Other templates should be updated to use the "title-string" method. As I make corrections I also intend to update sorting configurations to use the newer guideline described here: http://wiki.koha-community.org/wiki/DataTables_HowTo#Obsolete_configuration_methods
Created attachment 27139 [details] [review] Bug 12089 - Remove use of dt_add_type_uk_date() - Circulation This patch removes instances of dt_add_type_uk_date() from there circulation templates and updates the sorting configuration according to current guidelines. To test, enable the UseTablesortForCirc system preference and open a patron for circulation who has multiple items checked out. Confirm that sorting by due date, title, and checkout date work correctly. Locate a patron who is guarantor to another or is guaranteed by another. One or both patrons should have checkouts. The "relatives checkouts" tab on the checkout page should sort correctly on due date, title, and checkout date. On the transfers to receive report, confirm that sorting by date of transfer and title work correctly for all tables. On the holds awaiting pickup report the "available since" and title columns should sort correctly for tables in both tabs (waiting and over).
Created attachment 27143 [details] [review] Bug 12089 - Remove use of dt_add_type_uk_date() - Members This patch removes use of dt_add_type_uk_date() from the circulation history page and updates the sorting configuration according to current guidelines. The patch also makes corrections for HTML validity. To test, open the circulation history page for a patron with a history of checkouts. Confirm that the date, title, checkout date, due date, and return date columns sort correctly.
Created attachment 27223 [details] [review] Bug 12089 - Remove use of dt_add_type_uk_date() - Budgets This patch removes use of dt_add_type_uk_date() from the budgets administration page and updates the sorting configuration according to current guidelines. Date sorting is converted to the title-string method. Invalid <td> "align" attribute is replaced with a class. Also corrected: Active tab selection based on class. To test, go to Administration -> Budgets and confirm that sorting works correctly on both the active and inactive budget tabs. Sorting by date should work correctly regardless of dateformat system preference. To test tab selection, append "?tab=2" to the page URL and confirm that the inactive budget tab is selected.
Created attachment 27224 [details] [review] Bug 12089 [Revised] Remove use of dt_add_type_uk_date() - Circulation This patch removes instances of dt_add_type_uk_date() from there circulation templates and updates the sorting configuration according to current guidelines. To test, enable the UseTablesortForCirc system preference and open a patron for circulation who has multiple items checked out. Confirm that sorting by due date, title, and checkout date work correctly. Locate a patron who is guarantor to another or is guaranteed by another. One or both patrons should have checkouts. The "relatives checkouts" tab on the checkout page should sort correctly on due date, title, and checkout date. On the transfers to receive report, confirm that sorting by date of transfer and title work correctly for all tables. On the holds awaiting pickup report the "available since" and title columns should sort correctly for tables in both tabs (waiting and over). Revision: Missed an instance of dt_add_type_uk_date().
Created attachment 27260 [details] [review] Bug 12089 - Remove use of dt_add_type_uk_date() - Acquisitions This patch removes instances of dt_add_type_uk_date() from acquisitions templates and updates sorting configurations according to current guidelines. In cases where a formatted date was passed from a Perl script, the script has been modified to pass an unformatted date. Several instances of the no longer valid align attribute have been removed from <td> tags in favor of an existing "data" class which is suitable for display of currency values. To test, view the following pages in Acquisitions. Columns containing dates should sort correctly regardless of dateformat system preference setting. Columns containing bibliographic titles should ignore articles when sorting. - Add to an order from a staged file: The table of staged files should sort correctly. After clicking "add orders" for one of the staged files, the table of titles in that staged file should also be sorted correctly. - Add to an order from a subscription. The table of subscription search results should sort correctly. - Orders search results should sort correctly. - Late orders should sort correctly. - Search for a vendor. Click on the vendor name to view the vendor detail page. The table of contracts on this page should sort correctly. - From the Acquisitions home page click a number in the "spent" column of the table of available funds. The table of orders should sort correctly. - From the Acquisitions home page click a number in the "ordered" column of the table of available funds. The table of orders should sort correctly. - From a vendor detail page, click the "Receive shipments" button. On the receive shipments page the table of shipments should be sorted correctly.
Created attachment 27261 [details] [review] Bug 12089 - Remove use of dt_add_type_uk_date() - JavaScript This patch removes the now unused dt_add_type_uk_date function from Koha's custom DataTables javascript file. To test, be sure all other patches on Bug 12089 are applied. Apply this patch and search for instances of dt_add_type_uk_date. There should be none.
I'm still seeing instances of "dt_add_type_uk_date" in circ/pendingreserves.tt serials/claims.tt serials/serials-search.tt serials/serials-collection.tt I think pendingreserves.tt has been taken care of by a different patch... bug 12088, I think. Should the rest be included here? When applying the Acquisitions patch, it did some auto-merging, so a rebase might be a good idea in any case.
(In reply to David Cook from comment #7) > I'm still seeing instances of "dt_add_type_uk_date" in > > circ/pendingreserves.tt > serials/claims.tt > serials/serials-search.tt > serials/serials-collection.tt > > I think pendingreserves.tt has been taken care of by a different patch... > bug 12088, I think. Should the rest be included here? > > When applying the Acquisitions patch, it did some auto-merging, so a rebase > might be a good idea in any case. Ah, bug 11719 has those other ones covered. I'll keep going with this one then...
Since this bug removes the dt_add_type_uk_date() function all together, I'm adding some dependencies. This patch should be pushed after those, since Koha will still rely on the dt_add_type_uk_date() function until all other instances of it have been removed. When those patches are pushed, this bug should clear out the remaining instances and remove the function.
Created attachment 27507 [details] [review] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Members This patch removes use of dt_add_type_uk_date() from the circulation history page and updates the sorting configuration according to current guidelines. The patch also makes corrections for HTML validity. To test, open the circulation history page for a patron with a history of checkouts. Confirm that the date, title, checkout date, due date, and return date columns sort correctly. Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 27508 [details] [review] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Members This patch removes use of dt_add_type_uk_date() from the circulation history page and updates the sorting configuration according to current guidelines. The patch also makes corrections for HTML validity. To test, open the circulation history page for a patron with a history of checkouts. Confirm that the date, title, checkout date, due date, and return date columns sort correctly. Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 27509 [details] [review] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Budgets This patch removes use of dt_add_type_uk_date() from the budgets administration page and updates the sorting configuration according to current guidelines. Date sorting is converted to the title-string method. Invalid <td> "align" attribute is replaced with a class. Also corrected: Active tab selection based on class. To test, go to Administration -> Budgets and confirm that sorting works correctly on both the active and inactive budget tabs. Sorting by date should work correctly regardless of dateformat system preference. To test tab selection, append "?tab=2" to the page URL and confirm that the inactive budget tab is selected. Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 27510 [details] [review] Bug 12089 [SIGNED OFF] [Revised] Remove use of dt_add_type_uk_date() - Circulation This patch removes instances of dt_add_type_uk_date() from there circulation templates and updates the sorting configuration according to current guidelines. To test, enable the UseTablesortForCirc system preference and open a patron for circulation who has multiple items checked out. Confirm that sorting by due date, title, and checkout date work correctly. Locate a patron who is guarantor to another or is guaranteed by another. One or both patrons should have checkouts. The "relatives checkouts" tab on the checkout page should sort correctly on due date, title, and checkout date. On the transfers to receive report, confirm that sorting by date of transfer and title work correctly for all tables. On the holds awaiting pickup report the "available since" and title columns should sort correctly for tables in both tabs (waiting and over). Revision: Missed an instance of dt_add_type_uk_date(). Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 27511 [details] [review] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Acquisitions This patch removes instances of dt_add_type_uk_date() from acquisitions templates and updates sorting configurations according to current guidelines. In cases where a formatted date was passed from a Perl script, the script has been modified to pass an unformatted date. Several instances of the no longer valid align attribute have been removed from <td> tags in favor of an existing "data" class which is suitable for display of currency values. To test, view the following pages in Acquisitions. Columns containing dates should sort correctly regardless of dateformat system preference setting. Columns containing bibliographic titles should ignore articles when sorting. - Add to an order from a staged file: The table of staged files should sort correctly. After clicking "add orders" for one of the staged files, the table of titles in that staged file should also be sorted correctly. - Add to an order from a subscription. The table of subscription search results should sort correctly. - Orders search results should sort correctly. - Late orders should sort correctly. - Search for a vendor. Click on the vendor name to view the vendor detail page. The table of contracts on this page should sort correctly. - From the Acquisitions home page click a number in the "spent" column of the table of available funds. The table of orders should sort correctly. - From the Acquisitions home page click a number in the "ordered" column of the table of available funds. The table of orders should sort correctly. - From a vendor detail page, click the "Receive shipments" button. On the receive shipments page the table of shipments should be sorted correctly. Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 27512 [details] [review] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - JavaScript This patch removes the now unused dt_add_type_uk_date function from Koha's custom DataTables javascript file. To test, be sure all other patches on Bug 12089 are applied. Apply this patch and search for instances of dt_add_type_uk_date. There should be none. Signed-off-by: David Cook <dcook@prosentient.com.au> Works as described.
Thanks for testing David, and for adding the dependencies to the bug report where they belong (instead of just in my head).
The sort on the 'Order' column for the staged import record list could be removed, but this page will be changed a lot if 7180 gets pushed, not a blocker.
Created attachment 27676 [details] [review] [PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Members This patch removes use of dt_add_type_uk_date() from the circulation history page and updates the sorting configuration according to current guidelines. The patch also makes corrections for HTML validity. To test, open the circulation history page for a patron with a history of checkouts. Confirm that the date, title, checkout date, due date, and return date columns sort correctly. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 27677 [details] [review] [PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Budgets This patch removes use of dt_add_type_uk_date() from the budgets administration page and updates the sorting configuration according to current guidelines. Date sorting is converted to the title-string method. Invalid <td> "align" attribute is replaced with a class. Also corrected: Active tab selection based on class. To test, go to Administration -> Budgets and confirm that sorting works correctly on both the active and inactive budget tabs. Sorting by date should work correctly regardless of dateformat system preference. To test tab selection, append "?tab=2" to the page URL and confirm that the inactive budget tab is selected. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 27678 [details] [review] [PASSED QA] Bug 12089 [SIGNED OFF] [Revised] Remove use of dt_add_type_uk_date() - Circulation This patch removes instances of dt_add_type_uk_date() from there circulation templates and updates the sorting configuration according to current guidelines. To test, enable the UseTablesortForCirc system preference and open a patron for circulation who has multiple items checked out. Confirm that sorting by due date, title, and checkout date work correctly. Locate a patron who is guarantor to another or is guaranteed by another. One or both patrons should have checkouts. The "relatives checkouts" tab on the checkout page should sort correctly on due date, title, and checkout date. On the transfers to receive report, confirm that sorting by date of transfer and title work correctly for all tables. On the holds awaiting pickup report the "available since" and title columns should sort correctly for tables in both tabs (waiting and over). Revision: Missed an instance of dt_add_type_uk_date(). Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 27679 [details] [review] [PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - Acquisitions This patch removes instances of dt_add_type_uk_date() from acquisitions templates and updates sorting configurations according to current guidelines. In cases where a formatted date was passed from a Perl script, the script has been modified to pass an unformatted date. Several instances of the no longer valid align attribute have been removed from <td> tags in favor of an existing "data" class which is suitable for display of currency values. To test, view the following pages in Acquisitions. Columns containing dates should sort correctly regardless of dateformat system preference setting. Columns containing bibliographic titles should ignore articles when sorting. - Add to an order from a staged file: The table of staged files should sort correctly. After clicking "add orders" for one of the staged files, the table of titles in that staged file should also be sorted correctly. - Add to an order from a subscription. The table of subscription search results should sort correctly. - Orders search results should sort correctly. - Late orders should sort correctly. - Search for a vendor. Click on the vendor name to view the vendor detail page. The table of contracts on this page should sort correctly. - From the Acquisitions home page click a number in the "spent" column of the table of available funds. The table of orders should sort correctly. - From the Acquisitions home page click a number in the "ordered" column of the table of available funds. The table of orders should sort correctly. - From a vendor detail page, click the "Receive shipments" button. On the receive shipments page the table of shipments should be sorted correctly. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 27680 [details] [review] [PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - JavaScript This patch removes the now unused dt_add_type_uk_date function from Koha's custom DataTables javascript file. To test, be sure all other patches on Bug 12089 are applied. Apply this patch and search for instances of dt_add_type_uk_date. There should be none. Signed-off-by: David Cook <dcook@prosentient.com.au> Works as described. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script, works as described. No regressions found, sorting and searching in all tables touched by these patches works ok.
Pushed to master. Thanks, Owen!