Bug 12258 - Datatable in Patrons Account Fines
Summary: Datatable in Patrons Account Fines
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Maxime Pelletier
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 20:36 UTC by Maxime Pelletier
Modified: 2015-06-04 23:32 UTC (History)
8 users (show)

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


Attachments
Add datatables to account fines (3.01 KB, patch)
2014-05-14 20:41 UTC, Maxime Pelletier
Details | Diff | Splinter Review
Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00). (3.32 KB, patch)
2014-10-29 20:03 UTC, Marc Véron
Details | Diff | Splinter Review
[Signed-off] Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00). (3.33 KB, patch)
2014-10-29 20:07 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12258 [Template follow-up] Datatable in Patrons Account Fines (4.70 KB, patch)
2014-10-30 14:23 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed-off] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines (4.84 KB, patch)
2014-10-30 19:32 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00). (3.38 KB, patch)
2014-10-31 06:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines (4.96 KB, patch)
2014-10-31 06:02 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 Maxime Pelletier 2014-05-14 20:36:45 UTC
Attached is a patch to add datatables in the patron's account fines (members/boraccount.pl).

Test steps :

* Create a few manual invoices with fines.
* Pay a fine.
* Go back to the account tab.
* Try the "Filter paid transactions" button. It should filter everything with 0.00 in the Outstanding column.
* Try the "Show all transactions" button.
* Play around with the buttons :p

Sponsored by the CCSR
Comment 1 Maxime Pelletier 2014-05-14 20:41:25 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-10-29 20:03:36 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2014-10-29 20:07:54 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-10-30 00:57:45 UTC
This patch fails some of the tests and the QA script - sorry:

xt/single_quotes.t .......... 1/1 
#   Failed test 'Files do not contain single quotes _(' '
#   at xt/single_quotes.t line 42.
# Files list: 
# boraccount.tt:     var txtActivefilter = _('Filter paid transactions');
# ,     var txtInactivefilter = _('Show all transactions');
# Looks like you failed 1 test of 1.
xt/single_quotes.t .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 
xt/tt_valid.t ............... ok   
xt/verify-debian-docbook.t .. ok    
xt/yaml_valid.t ............. ok     

Test Summary Report
-------------------
xt/single_quotes.t        (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=5, Tests=82,  4 wallclock secs ( 0.07 usr  0.00 sys +  3.44 cusr  0.20 csys =  3.71 CPU)
Result: FAIL

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
   FAIL	  forbidden patterns
		forbidden pattern: simple-quote string (line 11)
		forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 7)
		forbidden pattern: simple-quote string (line 10)
		forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 4)
		forbidden pattern: To include datatables files, please use the include file (see bug 10868) (line 5)
		forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 5)
   OK	  tt_valid
   OK	  valid_template
Comment 5 Owen Leonard 2014-10-30 14:23:28 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2014-10-30 19:32:23 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2014-10-31 06:02:37 UTC
Created attachment 33022 [details] [review]
[PASSED QA] Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00).

Test steps :

* Create a few manual invoices with fines.
* Pay a fine.
* Go back to the account tab.
* Try the "Filter paid transactions" button. It should filter everything with 0.00 in the Outstanding column.
* Try the "Show all transactions" button.
* Play around with the buttons

Followed test steps. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2014-10-31 06:02:40 UTC
Created attachment 33023 [details] [review]
[PASSED QA] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines

This follow-up corrects some of the QA issues affecting the other patch,
as well as changing the way the "filter" option is displayed:

- Added the use of the DataTables include file
- Removed redundant document.ready
- Fixed single quotes
- Fixed default sort (should be date descending to match the current
  functionality)
- Adding missing <tr>
- Converted filter button to a link

The last change is a judgement call, but the button in the DataTables
toolbar looked awkward and caused ugly wrapping at narrower viewport
sizes. I think a link is more keeping with the pattern established by
"select all / clear all" links.

To test, apply both patches and view the account page
(members/boraccount.pl) for a patron who has paid and unpaid fines (the
more the better).

- Confirm that the default sort is by date descending.
- Confirm that DataTables controls (paging, search, result count) work
  correctly.
- Confirm that clicking the "Filter paid transactions" link works
  correctly to toggle display of paid transactions.

Works as expected. Passed koha-qa.pl.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, no problems found.
Passes QA script and tests.
Comment 9 Tomás Cohen Arazi (tcohen) 2014-11-11 18:28:39 UTC
Patches pushed to master.

Thanks Maxime!