Bug 31587 - Basket not accessible from ACQORDER notice
Summary: Basket not accessible from ACQORDER notice
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Katrin Fischer
URL:
Keywords: rel_21_05_candidate
: 28824 30791 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-20 14:21 UTC by Kyle M Hall
Modified: 2023-12-28 20:43 UTC (History)
6 users (show)

See Also:
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


Attachments
Bug 31587: Basket not accessible from ACQORDER notice (1.23 KB, patch)
2022-09-20 14:24 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31587: Regression tests (2.97 KB, patch)
2022-09-20 14:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31587: Basket not accessible from ACQORDER notice (1.28 KB, patch)
2022-09-20 14:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31587: Regression tests (3.03 KB, patch)
2022-10-08 10:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31587: Basket not accessible from ACQORDER notice (1.34 KB, patch)
2022-10-08 10: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 Kyle M Hall 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 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 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 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 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 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 wainuiwitikapark 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 wainuiwitikapark 2022-12-20 02:11:22 UTC
Backported to 21.05.x for 21.05.22
Comment 16 wainuiwitikapark 2022-12-23 00:26:54 UTC
Not released in 21.05.22
Comment 17 wainuiwitikapark 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