Bug 23181 - Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Summary: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-21 12:47 UTC by Kyle M Hall
Modified: 2021-06-14 21:28 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.05, 18.11.13


Attachments
Bug 23181 - Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices (1.16 KB, patch)
2019-06-21 12:53 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23181 - Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices (1.28 KB, patch)
2019-07-13 13:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23181: Extend unit tests (2.84 KB, patch)
2019-11-02 14:34 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23181: Extend unit tests (2.89 KB, patch)
2019-11-03 16:43 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices (1.33 KB, patch)
2019-11-03 16:43 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 23181: [18.11] Extend unit tests (3.06 KB, patch)
2019-12-03 12:55 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 Kyle M Hall 2019-06-21 12:47:28 UTC
Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.
Comment 1 Kyle M Hall 2019-06-21 12:53:16 UTC
Created attachment 90908 [details] [review]
Bug 23181 - Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices

Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.

Test Plan:
1) Attempt to use [% branch.branchame %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!
Comment 2 Katrin Fischer 2019-07-13 13:32:38 UTC
Created attachment 91520 [details] [review]
Bug 23181 - Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices

Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.

Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.
Comment 3 Martin Renvoize 2019-07-16 13:13:36 UTC
Looks good, but it's a change to a Koha:: module.. can we get a corresponding unit test update to prevent future regression pretty please.
Comment 4 Katrin Fischer 2019-11-02 12:45:53 UTC
A bit sad to see this one blocked by the missing test - it means you can't print your library's address into the new notices and have to hardcode it.
Comment 5 Katrin Fischer 2019-11-02 14:34:59 UTC
Created attachment 94967 [details] [review]
Bug 23181: Extend unit tests

Run t/db_dependent/Accounts.t
Comment 6 Katrin Fischer 2019-11-02 14:35:23 UTC
I've given the unit test a go.
Comment 7 Josef Moravec 2019-11-03 16:43:30 UTC
Created attachment 94980 [details] [review]
Bug 23181: Extend unit tests

Run t/db_dependent/Accounts.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2019-11-03 16:43:33 UTC
Created attachment 94981 [details] [review]
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices

Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.

Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Katrin Fischer 2019-11-03 18:53:31 UTC
Thx Josef!
Comment 10 Martin Renvoize 2019-11-04 14:54:30 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin Somers 2019-11-15 09:16:11 UTC
Pushed to 19.05.x for 19.05.05
Comment 12 Katrin Fischer 2019-12-03 12:55:23 UTC
Created attachment 95944 [details] [review]
Bug 23181: [18.11] Extend unit tests

Run t/db_dependent/Accounts.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Katrin Fischer 2019-12-03 12:55:53 UTC
Had to change the tests slightly to make them pass on 18.11 - attaching patch.
Comment 14 Katrin Fischer 2020-01-10 11:29:34 UTC
Hi Hayley, could you consider this for 18.11 please? I attached a patch that worked for me for the tests (so second and third should work together for 18.11)
Comment 15 Hayley Pelham 2020-01-12 23:31:14 UTC
Backported to 18.11.x for 18.1.13