Bug 11738

Summary: Use new DataTables include in batch patron modification template
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, sandboxes
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/tools/modborrowers.pl
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 11720    
Attachments: Bug 11738 - Use new DataTables include in batch patron modification template
Bug 11738 - Use new DataTables include in batch patron modification template
patron attr type screen
batch mod patron screen - without patch
batch mod patron screen - with patch
Bug 11738 [Revised] Use new DataTables include in batch patron modification template
Bug 11738 [Revised] Use new DataTables include in batch patron modification template
[PASSED QA] Bug 11738 [Revised] Use new DataTables include in batch patron modification template

Description Owen Leonard 2014-02-10 19:46:35 UTC
The batch patron modification template should be updated to use the new DataTables include file introduced by Bug 10649.
Comment 1 Owen Leonard 2014-02-10 20:00:56 UTC Comment hidden (obsolete)
Comment 2 Biblibre Sandboxes 2014-02-11 02:42:12 UTC
Patch tested with a sandbox, by merlissia <manuelimel@gmail.com>
Comment 3 Biblibre Sandboxes 2014-02-11 02:42:31 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-02-11 09:22:25 UTC
Regression found. To reproduce:
1/ Link a patron attribute to a patron category.
2/ On the patrons mod tools, you should see (at the bottom):

 Attribute: [SELECT] [CHECKBOX] [INPUT] [New] This attribute will be only applied to the patron's category "CATEGORY_CODE" 

With the patch, I get:
  Attribute: [SELECT] [CHECKBOX] [New]

This input and the message have disappeared.

Marked as Failed QA.
Comment 5 Jonathan Druart 2014-02-11 14:13:51 UTC
From IRC:
oleonard: Joubu: I'm having trouble reproducing the problem you had with Bug 11738
oleonard: Joubu: Can you describe the patron attribute you're working with?
Joubu: oleonard-away: In fact I get a JS error: "TypeError: m is undefined"
Joubu: oleonard-away: It is caused by the dynamic rows added by borrower.patron_attributes
Comment 6 Jonathan Druart 2014-02-11 15:54:22 UTC
Created attachment 25196 [details]
patron attr type screen
Comment 7 Jonathan Druart 2014-02-11 15:54:55 UTC
Created attachment 25197 [details]
batch mod patron screen - without patch
Comment 8 Jonathan Druart 2014-02-11 15:55:16 UTC
Created attachment 25198 [details]
batch mod patron screen - with patch
Comment 9 Owen Leonard 2014-02-11 17:21:52 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall (khall) 2014-02-28 16:56:11 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2014-03-16 14:23:56 UTC
Created attachment 26379 [details] [review]
[PASSED QA] Bug 11738 [Revised] Use new DataTables include in batch patron modification template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
batch patron modification template.

This patch modifies the template so that date columns are sorted using
the "title-string" filter, based on the unformatted date. The DataTables
configuration has also been modified to account for varying structure
based on the page state.

Other minor edits: Corrected capitalization.

To test, go Tools -> Batch patron modification and submit a list of
patrons for modification. The resulting page should be correctly sorted.
Date columns should sort correctly for all dateformat system pref
settings.

Test with extended patron attributes enabled. Test adding and removing
varying numbers of attributes to patrons in your batch.

Submit a change to multiple borrowers. The results page should also be
sorted correctly.

Revision: Corrected error caused by the variable number of columns in
the table corresponding to varying numbers of patron attributes.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
Comment 12 Galen Charlton 2014-03-26 19:32:05 UTC
Pushed to master.  Thanks, Owen!
Comment 13 Fridolin Somers 2014-07-11 06:48:32 UTC
Pushed to 3.14.x, will be in 3.14.09