Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.
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!
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.
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.
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.
Created attachment 94967 [details] [review] Bug 23181: Extend unit tests Run t/db_dependent/Accounts.t
I've given the unit test a go.
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>
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>
Thx Josef!
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.05
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>
Had to change the tests slightly to make them pass on 18.11 - attaching patch.
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)
Backported to 18.11.x for 18.1.13