Bug 31587

Summary: Basket not accessible from ACQORDER notice
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: AcquisitionsAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, lucas, martin.renvoize, tomascohen, wainuiwitikapark
Version: MainKeywords: rel_21_05_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This makes sure that the basket object is passed to the ACQORDER notice in order to allow adding information about the basket and the order lines within it.
Version(s) released in:
22.11.00, 22.05.08, 21.11.15
Circulation function:
Attachments: Bug 31587: Basket not accessible from ACQORDER notice
Bug 31587: Regression tests
Bug 31587: Basket not accessible from ACQORDER notice
Bug 31587: Regression tests
Bug 31587: Basket not accessible from ACQORDER notice

Description Kyle M Hall (khall) 2022-09-20 14:21:27 UTC
The parameter "aqbasket" is passed to GetPreparedLetter, but is always undefined for the notice ACQORDER.
Comment 1 Kyle M Hall (khall) 2022-09-20 14:24:30 UTC
Created attachment 140786 [details] [review]
Bug 31587: Basket not accessible from ACQORDER notice

The parameter "aqbasket" is passed to GetPreparedLetter, but is always undefined for the notice ACQORDER.

Test Plan:
1) Set your ACQORDER notice content to:
   ***[% basket %]***
2) Set up a vendor with an email, set contact for email so the "E-mail
   order" button shows on a basket for that vendor
3) E-mail the basket
4) Note the email contents are "******"
5) Apply this patch
6) Restart all the things!
7) Email the basket again
8) Note the content looks something like:
   ***Koha::Acquisition::Basket=HASH(0x55870acd96e0)***
Comment 2 Tomás Cohen Arazi (tcohen) 2022-09-20 14:47:56 UTC
Created attachment 140787 [details] [review]
Bug 31587: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2022-09-20 14:48:00 UTC
Created attachment 140788 [details] [review]
Bug 31587: Basket not accessible from ACQORDER notice

The parameter "aqbasket" is passed to GetPreparedLetter, but is always undefined for the notice ACQORDER.

Test Plan:
1) Set your ACQORDER notice content to:
   ***[% basket %]***
2) Set up a vendor with an email, set contact for email so the "E-mail
   order" button shows on a basket for that vendor
3) E-mail the basket
4) Note the email contents are "******"
5) Apply this patch
6) Restart all the things!
7) Email the basket again
8) Note the content looks something like:
   ***Koha::Acquisition::Basket=HASH(0x55870acd96e0)***

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Katrin Fischer 2022-10-08 10:02:19 UTC
Created attachment 141537 [details] [review]
Bug 31587: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2022-10-08 10:02:24 UTC
Created attachment 141538 [details] [review]
Bug 31587: Basket not accessible from ACQORDER notice

The parameter "aqbasket" is passed to GetPreparedLetter, but is always undefined for the notice ACQORDER.

Test Plan:
1) Set your ACQORDER notice content to:
   ***[% basket %]***
2) Set up a vendor with an email, set contact for email so the "E-mail
   order" button shows on a basket for that vendor
3) E-mail the basket
4) Note the email contents are "******"
5) Apply this patch
6) Restart all the things!
7) Email the basket again
8) Note the content looks something like:
   ***Koha::Acquisition::Basket=HASH(0x55870acd96e0)***

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2022-10-08 10:02:44 UTC
Thanks again, Kyle!
Comment 7 Katrin Fischer 2022-10-08 10:03:54 UTC
*** Bug 30791 has been marked as a duplicate of this bug. ***
Comment 8 Katrin Fischer 2022-10-08 13:37:12 UTC
Went ahead and updated the wiki page listing the available objects per notice:
https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit#Variables_available_in_each_notice
Comment 9 Tomás Cohen Arazi (tcohen) 2022-10-11 13:23:57 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 10 Katrin Fischer 2022-10-14 20:49:14 UTC
Ok, not a bad bug, but this would be SO helpful in lower versions :)
Comment 11 Jonathan Druart 2022-10-17 14:36:57 UTC
*** Bug 28824 has been marked as a duplicate of this bug. ***
Comment 12 Lucas Gass (lukeg) 2022-12-05 18:11:16 UTC
Backported to 22.05.x for upcoming 22.05.08
Comment 13 Arthur Suzuki 2022-12-14 14:24:54 UTC
applied to 21.11 for 21.11.15
Comment 14 Wainui Witika-Park 2022-12-15 00:39:46 UTC
(In reply to Arthur Suzuki from comment #13)
> applied to 21.11 for 21.11.15

I will backport this to 21.05.x for 21.05.22, however I cannot find this on your 21.11 branch to use the actual commit ID rather than the bugzilla patch
Comment 15 Wainui Witika-Park 2022-12-20 02:11:22 UTC
Backported to 21.05.x for 21.05.22
Comment 16 Wainui Witika-Park 2022-12-23 00:26:54 UTC
Not released in 21.05.22
Comment 17 Wainui Witika-Park 2023-03-15 00:36:12 UTC
(In reply to wainuiwitikapark from comment #16)
> Not released in 21.05.22

Reverted from 21.05 branch