Bug 30955: (follow-up) Merged related notices into lists

This patch merges the SHARE_ACCEPT and SHARE_INVITE notices into the
lists module. This makes a clearer case for introducing the lists module
in the first place.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jake Deery 2024-10-24 08:12:09 +00:00 committed by Katrin Fischer
parent e08797d51e
commit e34216f255
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 58 additions and 42 deletions

View File

@ -0,0 +1,16 @@
use Modern::Perl;
return {
bug_number => "30955",
description => "Move existing list-based notices to new lists category",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do( q{ UPDATE IGNORE letter SET module = 'lists' WHERE code = 'SHARE_ACCEPT'; } );
say $out "Moved SHARE_ACCEPT notice to lists module";
$dbh->do( q{ UPDATE IGNORE letter SET module = 'lists' WHERE code = 'SHARE_INVITE'; } );
say $out "Moved SHARE_INVITE notice to lists module";
},
};

View File

@ -1329,6 +1329,46 @@ tables:
- "[% branch.branchillemail %]"
- "[% branch.branchemail %]"
- module: lists
code: SHARE_ACCEPT
branchcode: ""
name: "Notification about an accepted share"
is_html: 0
title: "Share on list <<listname>> accepted"
message_transport_type: email
lang: default
content:
- "Dear patron,"
- ""
- "We want to inform you that <<borrowers.firstname>> <<borrowers.surname>> accepted your invitation to share your list <<listname>> in our library catalog."
- ""
- "Thank you."
- ""
- "Your library."
- module: lists
code: SHARE_INVITE
branchcode: ""
name: "Invitation for sharing a list"
is_html: 0
title: "Share list <<listname>>"
message_transport_type: email
lang: default
content:
- "Dear patron,"
- ""
- "One of our patrons, <<borrowers.firstname>> <<borrowers.surname>>, invites you to share a list <<listname>> in our library catalog."
- ""
- "To access this shared list, please click on the following URL or copy-and-paste it into your browser address bar."
- ""
- "<<shareurl>>"
- ""
- "In case you are not a patron in our library or do not want to accept this invitation, please ignore this mail. Note also that this invitation expires within two weeks."
- ""
- "Thank you."
- ""
- "Your library."
- module: lists
code: TRANSFER_OWNERSHIP
branchcode: ""
@ -1471,46 +1511,6 @@ tables:
- "<p>This link will be valid for 5 days from this email's reception, then you must reapply if you do not change your password.</p>"
- "<p>Thank you.</p>"
- module: members
code: SHARE_ACCEPT
branchcode: ""
name: "Notification about an accepted share"
is_html: 0
title: "Share on list <<listname>> accepted"
message_transport_type: email
lang: default
content:
- "Dear patron,"
- ""
- "We want to inform you that <<borrowers.firstname>> <<borrowers.surname>> accepted your invitation to share your list <<listname>> in our library catalog."
- ""
- "Thank you."
- ""
- "Your library."
- module: members
code: SHARE_INVITE
branchcode: ""
name: "Invitation for sharing a list"
is_html: 0
title: "Share list <<listname>>"
message_transport_type: email
lang: default
content:
- "Dear patron,"
- ""
- "One of our patrons, <<borrowers.firstname>> <<borrowers.surname>>, invites you to share a list <<listname>> in our library catalog."
- ""
- "To access this shared list, please click on the following URL or copy-and-paste it into your browser address bar."
- ""
- "<<shareurl>>"
- ""
- "In case you are not a patron in our library or do not want to accept this invitation, please ignore this mail. Note also that this invitation expires within two weeks."
- ""
- "Thank you."
- ""
- "Your library."
- module: members
code: WELCOME
branchcode: ""

View File

@ -191,7 +191,7 @@ sub notify_owner {
#prepare letter
my $letter = C4::Letters::GetPreparedLetter(
module => 'members',
module => 'lists',
letter_code => 'SHARE_ACCEPT',
branchcode => C4::Context->userenv->{"branch"},
lang => $patron->lang,
@ -257,7 +257,7 @@ sub send_invitekey {
#prepare letter
my $letter = C4::Letters::GetPreparedLetter(
module => 'members',
module => 'lists',
letter_code => 'SHARE_INVITE',
branchcode => C4::Context->userenv->{"branch"},
lang => 'default', # Not sure how we could use something more useful else here