Bugzilla – Attachment 133556 Details for
Bug 29698
items are not available for TT syntax for PREDUEDGST
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29698: Make items available for PREDUEDGST
Bug-29698-Make-items-available-for-PREDUEDGST.patch (text/plain), 2.64 KB, created by
Victor Grousset/tuxayo
on 2022-04-21 13:03:31 UTC
(
hide
)
Description:
Bug 29698: Make items available for PREDUEDGST
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2022-04-21 13:03:31 UTC
Size:
2.64 KB
patch
obsolete
>From f6e506f60542bd575aaf5f3fd80130df1f1177bf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Dec 2021 10:09:22 +0100 >Subject: [PATCH] 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> >--- > misc/cronjobs/advance_notices.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 96029dced0..9ec07659aa 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -492,6 +492,7 @@ sub parse_letter { > lang => $patron->lang, > substitute => $params->{'substitute'}, > tables => \%table_params, >+ ( $params->{itemnumbers} ? ( loops => { items => $params->{itemnumbers} } ) : () ), > message_transport_type => $params->{message_transport_type}, > ); > } >@@ -587,7 +588,9 @@ sub send_digests { > borrower_preferences => $borrower_preferences > }); > my $titles = ""; >+ my @itemnumbers; > while ( my $item_info = $next_item_info->()) { >+ push @itemnumbers, $item_info->{itemnumber}; > $titles .= C4::Letters::get_item_content( { item => $item_info, item_content_fields => \@item_content_fields } ); > } > >@@ -601,6 +604,7 @@ sub send_digests { > 'items.content' => $titles, > %branch_info > }, >+ itemnumbers => \@itemnumbers, > branchcode => $branchcode, > message_transport_type => $transport > } >-- >2.35.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29698
:
128547
|
131644
| 133556