Bug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST
If a notice is defined for the library of the patron, it should be used. Without this patch, the notice used is the one defined for all libraries. Test plan: 1/ Set the advanced notice for a patron using digest. 2/ Check one item out to this patron (backdate the return date according the days in advance value). 3/ launch advance_notices.pl -c 4/ Verify the notice used is the default one. 5/ Define a notice for the library of the patron for PREDUEDGST 6/ launch advance_notices.pl -c 7/ Verify the notice used is the one previously defined. 8/ Check one item out to this patron (date due = today) 9/ launch advance_notices.pl -c 10/ Verify the notice used is the default one. 11/ Define a notice for the library of the patron for DUEDGST 12/ launch advance_notices.pl -c 13/ Verify the notice used is the one previously defined. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Test case: User from Library A, checked out books - in library A from A and B - in library B from B Verified, that the 'all libraries' notice is still used, when no specific notice is defined. Verified, that the patron's home library noticed is used, when defined. Note: Before and after the patch we print the branch information from the patron's home library, so also using the template from this branch, seems logical. All items over all branches are processed into one single reminder email, before and after the patch. Signed-off-by: Galen Charlton <gmc@esilibrary.com> (cherry picked from commit836f3ce992) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (cherry picked from commit125f532a92)
This commit is contained in:
parent
357f22363c
commit
3c8be0709f
|
|
@ -349,13 +349,18 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) {
|
|||
## Get branch info for borrowers home library.
|
||||
my %branch_info = get_branch_info( $borrowernumber );
|
||||
|
||||
my $letter = parse_letter( { letter_code => $letter_type,
|
||||
borrowernumber => $borrowernumber,
|
||||
substitute => { count => $count,
|
||||
'items.content' => $titles,
|
||||
%branch_info,
|
||||
}
|
||||
} )
|
||||
my $letter = parse_letter(
|
||||
{
|
||||
letter_code => $letter_type,
|
||||
borrowernumber => $borrowernumber,
|
||||
substitute => {
|
||||
count => $count,
|
||||
'items.content' => $titles,
|
||||
%branch_info,
|
||||
},
|
||||
branchcode => $branch_info{ "branches.branchcode" },
|
||||
}
|
||||
)
|
||||
or die "no letter of type '$letter_type' found. Please see sample_notices.sql";
|
||||
if ($nomail) {
|
||||
local $, = "\f";
|
||||
|
|
@ -392,13 +397,18 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) {
|
|||
## Get branch info for borrowers home library.
|
||||
my %branch_info = get_branch_info( $borrowernumber );
|
||||
|
||||
my $letter = parse_letter( { letter_code => $letter_type,
|
||||
borrowernumber => $borrowernumber,
|
||||
substitute => { count => $count,
|
||||
'items.content' => $titles,
|
||||
%branch_info,
|
||||
}
|
||||
} )
|
||||
my $letter = parse_letter(
|
||||
{
|
||||
letter_code => $letter_type,
|
||||
borrowernumber => $borrowernumber,
|
||||
substitute => {
|
||||
count => $count,
|
||||
'items.content' => $titles,
|
||||
%branch_info,
|
||||
},
|
||||
branchcode => $branch_info{ "branches.branchcode" },
|
||||
}
|
||||
)
|
||||
or die "no letter of type '$letter_type' found. Please see sample_notices.sql";
|
||||
|
||||
if ($nomail) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue