Bug 29952 - Filter Paid Transactions Broken on Transactions tab in Staff
Summary: Filter Paid Transactions Broken on Transactions tab in Staff
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-26 22:33 UTC by Lisette Scheer
Modified: 2022-06-15 07:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the "Filter paid transactions" link in the staff interface on the Patron account > Accounting > Transactions tab. It now correctly filters the list of transactions - only transactions with an outstanding amount greater than zero are shown ("Show all transactions" clears the filter). Before this fix, clicking on the link didn't do anything and didn't filter any of the transactions as expected.
Version(s) released in:
22.05.00,21.11.03,21.05.11


Attachments
Bug 29952: [20.11.x] Replace obsolete DataTable column filter function (1.96 KB, patch)
2022-01-27 12:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29952: Replace obsolete DataTable column filter function (1.95 KB, patch)
2022-01-27 12:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29952: [20.11.x] Replace obsolete DataTable column filter function (2.01 KB, patch)
2022-02-01 13:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29952: Replace obsolete DataTable column filter function (2.00 KB, patch)
2022-02-04 12:09 UTC, David Nind
Details | Diff | Splinter Review
Bug 29952: Replace obsolete DataTable column filter function (2.07 KB, patch)
2022-02-08 17:38 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 Lisette Scheer 2022-01-26 22:33:24 UTC
I tested in both master and on 21.05.08 and the "Filter paid transactions" link on  members/boraccount.pl does nothing anymore. 

Lisette
Comment 1 Katrin Fischer 2022-01-27 09:27:01 UTC
It's also broken on 20.11 - thx for the bug Lisette, it kept escaping from my list.
Comment 2 Owen Leonard 2022-01-27 12:23:11 UTC
Created attachment 129873 [details] [review]
Bug 29952: [20.11.x] Replace obsolete DataTable column filter function

The "Filter paid transactions" link on the Accounting -> Transactions
page is broken because it uses an obsolete DataTables function for
filtering. This patch updates it to use the current syntax, available in
DataTables since version 1.10.

To test, apply the patch and locate a patron in the staff interface who
has multiple fines, some paid.

- View the patron's "Accounting" page and click the "Transactions" tab.
- Click the "Filter paid transactions" link. The table should be
  filtered so that only transactions with an outstanding amount > zero
  are shown.
- The filter link should change to read "Show all transactions."
- Clicking "Show all transactions" should clear the filter.
- Test with one or more columns hidden using the "Columns" control.
  Filtering should still work correctly with columns hidden.
Comment 3 Owen Leonard 2022-01-27 12:40:02 UTC
Created attachment 129874 [details] [review]
Bug 29952: Replace obsolete DataTable column filter function

The "Filter paid transactions" link on the Accounting -> Transactions
page is broken because it uses an obsolete DataTables function for
filtering. This patch updates it to use the current syntax, available in
DataTables since version 1.10.

To test, apply the patch and locate a patron in the staff interface who
has multiple fines, some paid.

- View the patron's "Accounting" page and click the "Transactions" tab.
- Click the "Filter paid transactions" link. The table should be
  filtered so that only transactions with an outstanding amount > zero
  are shown.
- The filter link should change to read "Show all transactions."
- Clicking "Show all transactions" should clear the filter.
- Test with one or more columns hidden using the "Columns" control.
  Filtering should still work correctly with columns hidden.
Comment 4 Lisette Scheer 2022-01-27 19:10:16 UTC
The table no longer appears to be a datatable, just a regular table. 

The console gives me the following error:

boraccount.pl:1596 Uncaught SyntaxError: Unexpected token '<<'


This is line 1596 in the source code:
<<<<<<< HEAD


Lisette
Comment 5 Owen Leonard 2022-01-28 11:26:48 UTC
(In reply to Lisette Scheer from comment #4)
> This is line 1596 in the source code:
> <<<<<<< HEAD

This bug report has two patches, one for master and one for 20.11.x. Applying both will cause a conflict.
Comment 6 Katrin Fischer 2022-02-01 13:17:16 UTC
Created attachment 130041 [details] [review]
Bug 29952: [20.11.x] Replace obsolete DataTable column filter function

The "Filter paid transactions" link on the Accounting -> Transactions
page is broken because it uses an obsolete DataTables function for
filtering. This patch updates it to use the current syntax, available in
DataTables since version 1.10.

To test, apply the patch and locate a patron in the staff interface who
has multiple fines, some paid.

- View the patron's "Accounting" page and click the "Transactions" tab.
- Click the "Filter paid transactions" link. The table should be
  filtered so that only transactions with an outstanding amount > zero
  are shown.
- The filter link should change to read "Show all transactions."
- Clicking "Show all transactions" should clear the filter.
- Test with one or more columns hidden using the "Columns" control.
  Filtering should still work correctly with columns hidden.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 7 Katrin Fischer 2022-02-01 13:18:10 UTC
Tested the 20.11 patch and it works like a charm, thx!
Comment 8 David Nind 2022-02-04 12:09:15 UTC
Created attachment 130160 [details] [review]
Bug 29952: Replace obsolete DataTable column filter function

The "Filter paid transactions" link on the Accounting -> Transactions
page is broken because it uses an obsolete DataTables function for
filtering. This patch updates it to use the current syntax, available in
DataTables since version 1.10.

To test, apply the patch and locate a patron in the staff interface who
has multiple fines, some paid.

- View the patron's "Accounting" page and click the "Transactions" tab.
- Click the "Filter paid transactions" link. The table should be
  filtered so that only transactions with an outstanding amount > zero
  are shown.
- The filter link should change to read "Show all transactions."
- Clicking "Show all transactions" should clear the filter.
- Test with one or more columns hidden using the "Columns" control.
  Filtering should still work correctly with columns hidden.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2022-02-04 12:10:21 UTC
Tested and signed off the patch for master (20.11 patch already tested by Katrin).
Comment 10 Jonathan Druart 2022-02-08 17:38:40 UTC
Created attachment 130333 [details] [review]
Bug 29952: Replace obsolete DataTable column filter function

The "Filter paid transactions" link on the Accounting -> Transactions
page is broken because it uses an obsolete DataTables function for
filtering. This patch updates it to use the current syntax, available in
DataTables since version 1.10.

To test, apply the patch and locate a patron in the staff interface who
has multiple fines, some paid.

- View the patron's "Accounting" page and click the "Transactions" tab.
- Click the "Filter paid transactions" link. The table should be
  filtered so that only transactions with an outstanding amount > zero
  are shown.
- The filter link should change to read "Show all transactions."
- Clicking "Show all transactions" should clear the filter.
- Test with one or more columns hidden using the "Columns" control.
  Filtering should still work correctly with columns hidden.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Fridolin Somers 2022-02-16 21:52:34 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 12 Kyle M Hall 2022-02-18 12:52:06 UTC
Pushed to 21.11.x for 21.11.03
Comment 13 Andrew Fuerste-Henry 2022-02-21 17:04:09 UTC
Pushed to 21.05.x for 21.05.11
Comment 14 Victor Grousset/tuxayo 2022-03-18 00:12:47 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.
Comment 15 Katrin Fischer 2022-05-27 09:03:34 UTC
(In reply to Victor Grousset/tuxayo from comment #14)
> Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.

It is actually, but maybe a little late now :)
Comment 16 Victor Grousset/tuxayo 2022-06-13 16:49:32 UTC
I should still be able to backport and push to the branch. Does that help?
Comment 17 Katrin Fischer 2022-06-13 17:24:26 UTC
Sure :)
Comment 18 Victor Grousset/tuxayo 2022-06-15 01:35:29 UTC
Sorry, I don't have the rights for the branch anymore. I just applied the 20.11.x patch locally but couldn't test it because something is wrong with my local koha environment.
Comment 19 Katrin Fischer 2022-06-15 07:43:29 UTC
(In reply to Victor Grousset/tuxayo from comment #18)
> Sorry, I don't have the rights for the branch anymore. I just applied the
> 20.11.x patch locally but couldn't test it because something is wrong with
> my local koha environment.

Sorry, that's on me. I was looking at the 22.05 roles page... not realizing that 20.11 is already EOL.