Bug 11711 - Use new DataTables include in circ templates
Summary: Use new DataTables include in circ templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 16:27 UTC by Owen Leonard
Modified: 2015-06-04 23:30 UTC (History)
3 users (show)

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


Attachments
Bug 11711 - Use new DataTables include in circ templates (12.33 KB, patch)
2014-02-07 19:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11711 - Use new DataTables include in circ templates (12.24 KB, patch)
2014-03-11 12:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11711 - Use new DataTables include in circ templates (12.79 KB, patch)
2014-03-11 15:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11711 - Use new DataTables include in circ templates (12.82 KB, patch)
2014-03-11 16:20 UTC, Alex Sassmannshausen
Details | Diff | Splinter Review
Bug 11711 - Use new DataTables include in circ templates (12.88 KB, patch)
2014-03-19 16:07 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-02-07 16:27:37 UTC
Circulation templates which use the DataTables plugin should be updated to use the new DataTables include file introduced by Bug 10649.
Comment 1 Owen Leonard 2014-02-07 19:24:35 UTC Comment hidden (obsolete)
Comment 2 Alex Sassmannshausen 2014-03-11 10:27:10 UTC
Hello Owen,

During my review of the patch I came across what looks like a regression:
- After applying the patch
- 'Holds Awaiting Pickup' report loads with glitches
- Sort by date will not work
- Sort by title fixes the glitches and sorts OK.
- Firebug in my version of Firefox reports 3 JS errors every time
  date sort is attempted

Before the patch the page renders fine and the sorts work.

As this is my first review, please let me know if I need to provide additional information.

Best wishes,

Alex
Comment 3 Owen Leonard 2014-03-11 12:44:50 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2014-03-11 12:46:15 UTC
(In reply to Alex from comment #2)
> - 'Holds Awaiting Pickup' report loads with glitches

Quite right Alex, the patch didn't apply cleanly after the approval of Bug 11605. I have rebased the patch. I hope you can test again.
Comment 5 Alex Sassmannshausen 2014-03-11 14:21:12 UTC
Hi Owen,

Unfortunately the rebase does not seem to have fixed the issue: I'm still getting full success for all pages, except for 
http://testsystem/cgi-bin/koha/circ/waitingreserves.pl?allbranches=1

As before:
- After applying the patch
- 'Holds Awaiting Pickup' report loads with glitches
- Sort by date will not work
- Sort by title fixes the glitches and sorts OK.
- Sort by date will still not work.
- Firebug in my version of Firefox reports 3 JS errors every time
  date sort is attempted

Before the patch the page renders fine and the sorts work.

In addition to what I said before, some of the JS errors are not a regression, they occur in the pre-patch version too. The error that is a regression is:

Firebug: On page load: TypeError: a.match(...) is null

Every click on the 'Available since' <td> causes the error to re-appear.

HTH,

Alex
Comment 6 Owen Leonard 2014-03-11 15:07:16 UTC Comment hidden (obsolete)
Comment 7 Alex Sassmannshausen 2014-03-11 16:20:36 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2014-03-19 16:07:18 UTC
Created attachment 26460 [details] [review]
Bug 11711 - Use new DataTables include in circ templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
circ-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Circulation
  - The UseTablesortForCirc system preference must be enabled.
  - Check out to a patron with existing checkouts. Choose a patron who
    is a guarantor to another patron with checkouts in order to test the
    relatives' checkouts table.
  - The checkouts and relatives' checkouts tables have been modified to
    exclude articles when sorting of titles.

- Hold ratios - The title column has been configured to exclude articles
  from sorting

- Transfer to receive

- Holds queue
  - The title column has been configured to exclude articles when
    sorting
  - The date column has been modified to use the title-string filter for
    sorting. An unformatted date is now passed from C4::HoldsQueue.pm to
    the template, where the KohaDates filter is used for formatting.
    Sorting is based on the unformatted date.

- Holds awaiting pickup
  - The "available since" column has been configured for sorting on an
    unformatted date. waitingreserves.pl now passes the unformatted
    date to the template, and formatting is done using the KohaDates
    filter.
  - The title column has been configured to exclude articles when
    sorting.

Edit: Rebased on current master following commit of Bug 11605
Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Galen Charlton 2014-04-08 23:50:10 UTC
Pushed to master.  Thanks, Owen!
Comment 10 Fridolin Somers 2014-08-01 13:41:53 UTC
Pushed to 3.14.x, will be in 3.14.10