Bug 11719

Summary: Use new DataTables include in serials templates
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, gmcharlt, katrin.fischer, sandboxes
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 12089    
Attachments: Bug 11719 - Use new DataTables include in serials templates
Bug 11719 - Use new DataTables include in serials templates
Bug 11719 [Follow-up] Use new DataTables include in serials templates
Bug 11719 - Use new DataTables include in serials templates
Bug 11719 [Follow-up] Use new DataTables include in serials templates
Bug 11719 [Follow-up 2] Use new DataTables include in serials templates
Bug 11719 [Follow-up 2] Use new DataTables include in serials templates
Bug 11719 - Use new DataTables include in serials templates
Bug 11719 [Follow-up] Use new DataTables include in serials templates
Bug 11719 [Follow-up 2] Use new DataTables include in serials templates
[PASSED QA] Bug 11719 - Use new DataTables include in serials templates
[PASSED QA] Bug 11719 [Follow-up] Use new DataTables include in serials templates
[PASSED QA] Bug 11719 [Follow-up 2] Use new DataTables include in serials templates

Description Owen Leonard 2014-02-07 19:43:10 UTC
Serials 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-10 17:01:22 UTC Comment hidden (obsolete)
Comment 2 Biblibre Sandboxes 2014-02-25 04:33:11 UTC
Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com>
Comment 3 Biblibre Sandboxes 2014-02-25 04:33:30 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-02-25 07:02:08 UTC
Sorting on Call number gives me a Javascript error and the 'little arrow' icons don't change when clicking on them:
	
return a.match(/title="(.*?)"/)[1].toLowerCase();
Comment 5 Owen Leonard 2014-02-25 16:03:11 UTC Comment hidden (obsolete)
Comment 6 Biblibre Sandboxes 2014-03-11 03:48:09 UTC
Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com>
Comment 7 Biblibre Sandboxes 2014-03-11 03:48:37 UTC Comment hidden (obsolete)
Comment 8 Biblibre Sandboxes 2014-03-11 03:48:41 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2014-03-16 13:11:30 UTC
Hi Owen,

I tested and found 2 small things:

- On the serials collection page the sort on the Routing column could be removed, this is no reason for a fail, as it's there pre-patch. So just noting :)

- On the claims page the sorting is totally broken for me - maybe a side effect of another patch pushed since? Javascript error shown is:

TypeError: a.aoColumns[c] is undefined
	
...null};if("function"===typeof a)return function(b,d,i){return a(b,d,i)};if("strin...

jquery....min.js (Zeile 29)

Since and Claim date don't show the little arrow for sorting.
Comment 10 Owen Leonard 2014-04-15 19:36:37 UTC Comment hidden (obsolete)
Comment 11 David Cook 2014-04-24 01:25:59 UTC
Leaving this one for Katrin to test as she already seems to be up on it :)
Comment 12 Katrin Fischer 2014-04-24 05:14:50 UTC
Ah, please don't - then I can come back to do QA ;)
Comment 13 Chris Cormack 2014-04-24 13:19:42 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2014-04-26 08:33:32 UTC
I am having problems resolving the conflict here correctly - sorry.
Comment 15 Galen Charlton 2014-04-28 17:32:15 UTC Comment hidden (obsolete)
Comment 16 Galen Charlton 2014-04-28 17:32:28 UTC Comment hidden (obsolete)
Comment 17 Galen Charlton 2014-04-28 17:32:33 UTC Comment hidden (obsolete)
Comment 18 Katrin Fischer 2014-04-28 17:59:56 UTC
Created attachment 27737 [details] [review]
[PASSED QA] Bug 11719 - Use new DataTables include in serials templates

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

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

- Serials search results (serials/serials-search.pl): Perform a search
  which will return more than one subscription. The expiration date
  column is now sorted using the "title-string" filter for sorting based
  on the unformatted date. The "anti-the" filter has been added to the
  title column to exclude articles when sorting.

- Serials collection (serials/serials-collection.pl): View the serial
  colection page for an existing subscription. The table of issues
  should be sorted correctly.

- Serial claims (serials/claims.pl): The "since" and
  "claim date" columns have been modified to use the title-string filter
  for sorting based on the unformatted date.
  C4::Serials.pm::GetLateOrMissingIssues has been modified to pass an
  unformatted date along with the formatted date. The "anti-the" filter
  has been added to the title column to exclude articles when sorting.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested all 3 tables, no regressions found.
Passes QA script and tests.
Comment 19 Katrin Fischer 2014-04-28 18:00:21 UTC
Created attachment 27738 [details] [review]
[PASSED QA] Bug 11719 [Follow-up] Use new DataTables include in serials templates

This patch corrects column sorting configuration to avoid an error when
sorting on the call number column. Also changed: removed obsolete UK
sort mention.

To test, search for serial subscriptions. Test sorting on all columns in
the results table with and without the RoutingSerials preference
enabled. Sorting should work correctly without error.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 20 Katrin Fischer 2014-04-28 18:00:38 UTC
Created attachment 27739 [details] [review]
[PASSED QA] Bug 11719 [Follow-up 2] Use new DataTables include in serials templates

This second follow-up addresses QA issues:

- Corrected sorting on claims page while converting sorting
  configuration to up-to-date method.
- Removed sorting from routing list column on serial collection page.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 21 Galen Charlton 2014-04-28 18:44:56 UTC
Pushed to master.  Thanks, Owen!