Bug 27974 - Replace obsolete title-string sorting: Circulation templates
Summary: Replace obsolete title-string sorting: Circulation templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27934
  Show dependency treegraph
 
Reported: 2021-03-17 16:32 UTC by Owen Leonard
Modified: 2021-12-13 21:12 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 27974: Replace obsolete title-string sorting: Circulation templates (13.60 KB, patch)
2021-03-17 17:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27974: Replace obsolete title-string sorting: Circulation templates (13.64 KB, patch)
2021-03-17 18:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27974: Replace obsolete title-string sorting: Circulation templates (13.65 KB, patch)
2021-03-18 10:46 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 27974: (follow-up) Address missing instance (2.11 KB, patch)
2021-03-25 13:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27974: Replace obsolete title-string sorting: Circulation templates (13.76 KB, patch)
2021-03-27 14:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27974: (follow-up) Address missing instance (2.17 KB, patch)
2021-03-27 14:44 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-03-17 16:32:38 UTC
This patch will modify the following templates to replace the old "title-string" DataTables sorting method with the built-in method using "data-order" attributes.

  intranet-tmpl/prog/en/modules/circ/checkout-notes.tt
  intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt
  intranet-tmpl/prog/en/modules/circ/overdue.tt
  intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
  intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt
  intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
  intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt
Comment 1 Owen Leonard 2021-03-17 17:35:58 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-03-17 18:04:15 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize (ashimema) 2021-03-18 10:46:11 UTC
Created attachment 118456 [details] [review]
Bug 27974: Replace obsolete title-string sorting: Circulation templates

This patch modifies several circulation templates to replace the use of
the "title-string" DataTables sorting method with the newer
"data-order" attribute.

To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:

- Circulation -> Checkout notes
  - To populate the table, enable the "AllowCheckoutNotes" system
    preference enabled, log in to the OPAC as a user with checkouts.
    From the "Your summary" page use the "Report a problem" fields to
    submit notes.
- Circulation -> On-site checkouts
  - Requires the "OnSiteCheckouts" system preference to be enabled and
    and for some items to be checked out as on-site checkouts.
- Circulation -> Overdues
- Circulation -> Holds to pull
- Circulation -> Transfers to send
  - Requires the "StockRotation" preference to be enabled, some rotas
    to be set up, and for the stockrotation cron job to be executed.
- Circulation -> Transfers to receive
- Circulation -> Holds queue

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2021-03-18 10:46:55 UTC
Great bit of cleaning up, thanks Owen.

Signing off
Comment 5 Owen Leonard 2021-03-25 13:45:30 UTC
Created attachment 118798 [details] [review]
Bug 27974: (follow-up) Address missing instance

- Circulation -> Article requests
  - Both the "Pending" and "Processing" tabs.
Comment 6 Katrin Fischer 2021-03-27 14:44:52 UTC
Created attachment 118895 [details] [review]
Bug 27974: Replace obsolete title-string sorting: Circulation templates

This patch modifies several circulation templates to replace the use of
the "title-string" DataTables sorting method with the newer
"data-order" attribute.

To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:

- Circulation -> Checkout notes
  - To populate the table, enable the "AllowCheckoutNotes" system
    preference enabled, log in to the OPAC as a user with checkouts.
    From the "Your summary" page use the "Report a problem" fields to
    submit notes.
- Circulation -> On-site checkouts
  - Requires the "OnSiteCheckouts" system preference to be enabled and
    and for some items to be checked out as on-site checkouts.
- Circulation -> Overdues
- Circulation -> Holds to pull
- Circulation -> Transfers to send
  - Requires the "StockRotation" preference to be enabled, some rotas
    to be set up, and for the stockrotation cron job to be executed.
- Circulation -> Transfers to receive
- Circulation -> Holds queue

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-03-27 14:44:55 UTC
Created attachment 118896 [details] [review]
Bug 27974: (follow-up) Address missing instance

- Circulation -> Article requests
  - Both the "Pending" and "Processing" tabs.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2021-03-27 14:45:41 UTC
I wonder if we should change the module to Templates as that would make them all sort together in release notes and as we expect no behaviour change.
Comment 9 Martin Renvoize (ashimema) 2021-03-27 15:55:58 UTC
Good idea to change the module :)
Comment 10 Jonathan Druart 2021-04-06 13:32:01 UTC
Is that correct to remove "html" for on-site_checkouts.tt?
Comment 11 Jonathan Druart 2021-04-06 13:58:18 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 12 Fridolin Somers 2021-04-15 11:23:07 UTC
Enhancement not pushed to 20.11.x
Comment 13 Fridolin Somers 2021-04-15 11:25:45 UTC
Enhancement not pushed to 20.11.x