Bug 31858

Summary: TT syntax for ACQORDER notices
Product: Koha Reporter: Alex Arnaud <alex.arnaud>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: Needs documenting --- QA Contact: Kyle M Hall <kyle>
Severity: enhancement    
Priority: P5 - low CC: kyle, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04
Bug Depends on:    
Bug Blocks: 36417    
Attachments: Bug 31858: add TT syntax for ACQORDER notices
Bug 31858: unit tests
Bug 31858: add TT syntax for ACQORDER notices
Bug 31858: unit tests
Bug 31858: unit tests
Bug 31858: add TT syntax for ACQORDER notices
Bug 31858: add TT syntax for ACQORDER notices
Bug 31858: unit tests

Description Alex Arnaud 2022-10-18 14:51:01 UTC
Add TT syntax for ACQORDER notices.
Comment 1 Katrin Fischer 2022-10-18 14:53:20 UTC
Had this on my wish list to file too - the default notice is not very nice.

Did you see you can use [% basket %] now? (Bug 31858). That should allow us to build something much nicer.
Comment 2 Alex Arnaud 2022-10-19 07:09:49 UTC
(In reply to Katrin Fischer from comment #1)
> Did you see you can use [% basket %] now? (Bug 31858). That should allow us
Wrong bug number ?
Comment 3 Katrin Fischer 2022-10-19 07:10:58 UTC
(In reply to Alex Arnaud from comment #2)
> (In reply to Katrin Fischer from comment #1)
> > Did you see you can use [% basket %] now? (Bug 31858). That should allow us
> Wrong bug number ?

Typical me... bug 31587
Comment 4 Alex Arnaud 2022-10-19 14:41:45 UTC Comment hidden (obsolete)
Comment 5 Alex Arnaud 2022-10-19 14:41:49 UTC Comment hidden (obsolete)
Comment 6 Alex Arnaud 2022-10-19 14:44:14 UTC
Created attachment 142162 [details] [review]
Bug 31858: add TT syntax for ACQORDER notices

Test Plan:
    1) Set your ACQORDER notice content to:
        [%- USE Price -%]
        [% bookseller.name %]
        [% FOREACH order IN orders %]
        Ordernumber [% order.ordernumber %] ([% order.biblio.title %] - [% order.biblio.biblioitem.publicationyear %]) (quantity: [% order.quantity %]) ($[% order.listprice | $Price %] each).
        [% END %]
        Thank you,
        [% branch.branchname %]
    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) Check the content is correct
Comment 7 Alex Arnaud 2022-10-19 14:44:18 UTC
Created attachment 142163 [details] [review]
Bug 31858: unit tests
Comment 8 Marius 2023-01-12 21:27:21 UTC
Created attachment 145246 [details] [review]
Bug 31858: unit tests

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Comment 9 Kyle M Hall 2023-02-17 18:50:04 UTC
Created attachment 146904 [details] [review]
Bug 31858: add TT syntax for ACQORDER notices

Test Plan:
    1) Set your ACQORDER notice content to:
        [%- USE Price -%]
        [% bookseller.name %]
        [% FOREACH order IN orders %]
        Ordernumber [% order.ordernumber %] ([% order.biblio.title %] - [% order.biblio.biblioitem.publicationyear %]) (quantity: [% order.quantity %]) ($[% order.listprice | $Price %] each).
        [% END %]
        Thank you,
        [% branch.branchname %]
    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) Check the content is correct

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall 2023-02-17 18:55:32 UTC
Created attachment 146905 [details] [review]
Bug 31858: add TT syntax for ACQORDER notices

Test Plan:
    1) Set your ACQORDER notice content to:
        [%- USE Price -%]
        [% bookseller.name %]
        [% FOREACH order IN orders %]
        Ordernumber [% order.ordernumber %] ([% order.biblio.title %] - [% order.biblio.biblioitem.publicationyear %]) (quantity: [% order.quantity %]) ($[% order.listprice | $Price %] each).
        [% END %]
        Thank you,
        [% branch.branchname %]
    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) Check the content is correct

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Kyle M Hall 2023-02-17 18:55:38 UTC
Created attachment 146906 [details] [review]
Bug 31858: unit tests

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Tomás Cohen Arazi 2023-03-10 14:14:46 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 13 Matt Blenkinsop 2023-03-10 16:37:18 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 14 Katrin Fischer 2023-03-13 15:29:55 UTC
Could someone confirm that there is no way to access additional fields from baskets yet? I got as far as [% order.basket... %], but we seem to be missing a method here.
Comment 15 Lucas Gass 2023-03-14 20:30:27 UTC
Enhancement will not be backported to 22.05.x
Comment 16 Kyle M Hall 2023-03-15 12:01:04 UTC
(In reply to Katrin Fischer from comment #14)
> Could someone confirm that there is no way to access additional fields from
> baskets yet? I got as far as [% order.basket... %], but we seem to be
> missing a method here.

What data do you need to get to?
Comment 17 Katrin Fischer 2023-03-15 22:25:04 UTC
(In reply to Kyle M Hall from comment #16)
> (In reply to Katrin Fischer from comment #14)
> > Could someone confirm that there is no way to access additional fields from
> > baskets yet? I got as far as [% order.basket... %], but we seem to be
> > missing a method here.
> 
> What data do you need to get to?

additional fields for baskets in additional_fields_values.