Bug 9431

Summary: Use DataTables on Patron Category Administration page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, jonathan.druart
Version: Main   
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:
Circulation function:
Attachments: Bug 9431 - Use DataTables on Patron Category Administration page
Bug 9431 - Use DataTables on Patron Category Administration page
Bug 9431 [Revised] Use DataTables on Patron Category Administration page
Bug 9431 [Revised] Use DataTables on Patron Category Administration page
Bug 9431 [Revised] Use DataTables on Patron Category Administration page
Bug 9431 [Revised] Use DataTables on Patron Category Administration page
[SIGNED-OFF] Bug 9431 [Revised] Use DataTables on Patron Category Administration page
Bug 9431 [Revised] Use DataTables on Patron Category Administration page

Description Owen Leonard 2013-01-18 20:57:44 UTC
The Patron Category Administration page uses the old tablesorter plugin. It should use the DataTables plugin instead.
Comment 1 Owen Leonard 2013-01-18 21:00:45 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-01-18 21:02:10 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-01-22 15:06:33 UTC
Owen,

At least 3 columns are not sorted correctly:
"Enrollment period", "Age required" and "Upper age limit".
It is caused by a mix between integer and string.

Marked as Failed QA.
Comment 4 Owen Leonard 2013-01-22 16:23:38 UTC
(In reply to comment #3)
> At least 3 columns are not sorted correctly:
> "Enrollment period", "Age required" and "Upper age limit".
> It is caused by a mix between integer and string.

Good catch. I see now these columns weren't sorted correctly before this patch either, but an update shouldn't perpetuate the bug.
Comment 5 Owen Leonard 2013-01-29 15:01:13 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-01-30 15:26:15 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2013-02-26 15:40:59 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-02-26 15:56:35 UTC
Owen, you forgot the aLengthMenu key.
Comment 9 Katrin Fischer 2013-02-27 07:16:46 UTC
Hi Jonathan - should this be failed QA to make it show up on Owen's radar? :)
Comment 10 Jonathan Druart 2013-02-27 07:52:47 UTC
Katrin,
Perhaps he deliberately forgot it but I don't know why.
So yes, I switch to Failed QA.
Comment 11 Owen Leonard 2013-03-05 00:04:17 UTC Comment hidden (obsolete)
Comment 12 Bernardo Gonzalez Kriegel 2013-03-07 23:26:05 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2013-03-08 10:10:47 UTC
QA comment:

The natural sort works great.
The version 0.7 is available on http://www.datatables.net/plug-ins/sorting

Marked as Passed QA.
Comment 14 Jonathan Druart 2013-03-08 10:10:57 UTC
Created attachment 15968 [details] [review]
Bug 9431 [Revised] Use DataTables on Patron Category Administration page

Replace the tablesorter plugin with the DataTables plugin on the
patron category administration page. Structural changes were made to the
table markup for validity and to deal with a DataTables bug which
prevents it from properly parsing a <th> with a colspan.

To test, open the Patron Category Administration page (Administration ->
Patron types and categories). Confirm that table sorting works
correctly.

Revision adds a "natural sort" plugin to the main datatables
configuration JavaScript file to enable sorting of columns like those in
this table which include mixed numeric and text data. Allows correct
numeric sorting of data like "0 years, 1 years, 2 years, 18 years," etc.

Further revision corrects template path to datatables assets.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Sorting works. No errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 15 Jared Camins-Esakov 2013-03-11 12:47:25 UTC
This patch has been pushed to master.