Bug 29698 - items are not available for TT syntax for PREDUEDGST
Summary: items are not available for TT syntax for PREDUEDGST
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 34410 (view as bug list)
Depends on: 30259
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-15 09:09 UTC by Jonathan Druart
Modified: 2023-07-26 19:30 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 29698: Make items available for PREDUEDGST (1.79 KB, patch)
2021-12-15 09:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29698: Make items available for PREDUEDGST (1.84 KB, patch)
2022-03-11 23:29 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29698: Make items available for PREDUEDGST (2.64 KB, patch)
2022-04-21 13:03 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-12-15 09:09:20 UTC

    
Comment 1 Jonathan Druart 2021-12-15 09:12:15 UTC
Created attachment 128547 [details] [review]
Bug 29698: Make items available for PREDUEDGST

With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]
Comment 2 Jonathan Druart 2021-12-15 09:13:32 UTC
It should work for DUEDGST as well but I haven't tested.
Comment 3 Lucas Gass 2022-03-11 23:29:46 UTC
Created attachment 131644 [details] [review]
Bug 29698: Make items available for PREDUEDGST

With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2022-03-11 23:34:32 UTC
To test:

1. Add the following to PREDUEDGST and DUEDST:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

2. Find a patron and set there messaging prefs 'Item due' and 'Advanced notices' so they get an email and 'digest only'.  On 'Advanced notices' set Days in advance to 1.
3. Check some things out to a patron and make them due tomorrow. 
4. perl /kohadevbox/koha/misc/cronjobs/advance_notices.pl -v -c
5. Check the patrons notices and make sure the PREDUEDGST looks right.
6. Check some things out to a patron and make them due today.
7. Repeat 4.
8. Check the patrons notices and make sure the DUEDGST looks right.
Comment 5 Victor Grousset/tuxayo 2022-04-21 13:03:31 UTC
Created attachment 133556 [details] [review]
Bug 29698: Make items available for PREDUEDGST

With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

== test plan ==
1. Add the following to PREDUEDGST and DUEDST:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

2. Find a patron and set there messaging prefs 'Item due' and 'Advanced
  notices' so they get an email and 'digest only'.
  On 'Advanced notices' set Days in advance to 1.
3. Check some things out to a patron and make them due tomorrow.
4. perl /kohadevbox/koha/misc/cronjobs/advance_notices.pl -v -c
5. Check the patrons notices and make sure the PREDUEDGST looks right.
6. Check some things out to a patron and make them due today.
7. Repeat 4.
8. Check the patrons notices and make sure the DUEDGST looks right.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 6 Victor Grousset/tuxayo 2022-04-21 13:03:54 UTC
Works, qa script happy, code looks good, passing QA :)
Comment 7 Fridolin Somers 2022-05-05 00:32:28 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Katrin Fischer 2023-07-26 19:21:15 UTC
*** Bug 34410 has been marked as a duplicate of this bug. ***