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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
023e5eb0ca
commit
f19201a12c
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue