Bug 23781: Database updates
This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
4743e4639a
commit
96479a2af6
4 changed files with 60 additions and 3 deletions
28
installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl
Executable file
28
installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl
Executable file
|
@ -0,0 +1,28 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "23781",
|
||||
description => "Recalls notices and messaging preferences",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(
|
||||
q{ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Return recalled item','Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>.','sms'), ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>.','sms') }
|
||||
);
|
||||
|
||||
say $out "Added recalls SMS notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM";
|
||||
|
||||
$dbh->do(
|
||||
q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (12, "email", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (12, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (12, "phone", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (13, "email", 0, "circulation", "RETURN_RECALLED_ITEM", null), (13, "sms", 0, "circulation", "RETURN_RECALLED_ITEM", null), (13, "phone", 0, "circulation", "RETURN_RECALLED_ITEM", null) }
|
||||
);
|
||||
|
||||
say $out "Added message transports for recalls notices";
|
||||
|
||||
$dbh->do(
|
||||
q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (12, 'Recall_Waiting', 0), (13, 'Recall_Requested', 0) }
|
||||
);
|
||||
|
||||
say $out "Added message attributes for recalls: Recall_Waiting, Recall_Requested";
|
||||
},
|
||||
};
|
|
@ -2283,6 +2283,28 @@ tables:
|
|||
- ""
|
||||
- "Thank you!"
|
||||
|
||||
- module: circulation
|
||||
code: RETURN_RECALLED_ITEM
|
||||
branchcode: ""
|
||||
name: "Notification to return a recalled item"
|
||||
is_html: 0
|
||||
title: "Return recalled item"
|
||||
message_transport_type: sms
|
||||
lang: default
|
||||
content:
|
||||
- "Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>."
|
||||
|
||||
- module: circulation
|
||||
code: PICKUP_RECALLED_ITEM
|
||||
branchcode: ""
|
||||
name: "Recalled item awaiting pickup"
|
||||
is_html: 0
|
||||
title: "Recalled item awaiting pickup"
|
||||
message_transport_type: sms
|
||||
lang: default
|
||||
content:
|
||||
- "A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>."
|
||||
|
||||
- module: circulation
|
||||
code: RECALL_REQUESTER_DET
|
||||
branchcode: ""
|
||||
|
|
|
@ -10,5 +10,6 @@ values
|
|||
(8, 'Ill_unavailable', 0),
|
||||
(9, 'Auto_Renewals', 0),
|
||||
(10, 'Hold_Reminder', 0),
|
||||
(11, 'Ill_update', 0);
|
||||
|
||||
(11, 'Ill_update', 0),
|
||||
(12, 'Recall_Waiting', 0),
|
||||
(13, 'Recall_Requested', 0);
|
||||
|
|
|
@ -44,4 +44,10 @@ values
|
|||
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER'),
|
||||
(11, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE'),
|
||||
(11, 'sms', 0, 'ill', 'ILL_REQUEST_UPDATE'),
|
||||
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');
|
||||
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE'),
|
||||
(12, "email", 0, "circulation", "PICKUP_RECALLED_ITEM"),
|
||||
(12, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM"),
|
||||
(12, "phone", 0, "circulation", "PICKUP_RECALLED_ITEM"),
|
||||
(13, "email", 0, "circulation", "RETURN_RECALLED_ITEM"),
|
||||
(13, "sms", 0, "circulation", "RETURN_RECALLED_ITEM"),
|
||||
(13, "phone", 0, "circulation", "RETURN_RECALLED_ITEM");
|
||||
|
|
Loading…
Reference in a new issue