Bugzilla – Attachment 165240 Details for
Bug 23781
Recalls notices and messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23781: Database updates
Bug-23781-Database-updates.patch (text/plain), 5.75 KB, created by
Aleisha Amohia
on 2024-04-21 23:14:56 UTC
(
hide
)
Description:
Bug 23781: Database updates
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-04-21 23:14:56 UTC
Size:
5.75 KB
patch
obsolete
>From 26052595c469830bddee32903961004772917eef Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 21 Apr 2024 23:05:27 +0000 >Subject: [PATCH] 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. >--- > .../bug_23781-recalls_sms_notices.pl | 28 +++++++++++++++++++ > .../mysql/en/mandatory/sample_notices.yml | 22 +++++++++++++++ > .../sample_notices_message_attributes.sql | 5 ++-- > .../sample_notices_message_transports.sql | 8 +++++- > 4 files changed, 60 insertions(+), 3 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl b/installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl >new file mode 100755 >index 00000000000..87c8dc2643d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl >@@ -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"; >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 9675b3eb4f1..6074d23b151 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -2278,6 +2278,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: "" >diff --git a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql b/installer/data/mysql/mandatory/sample_notices_message_attributes.sql >index bd0294c960e..31bf6d0b371 100644 >--- a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql >+++ b/installer/data/mysql/mandatory/sample_notices_message_attributes.sql >@@ -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); >diff --git a/installer/data/mysql/mandatory/sample_notices_message_transports.sql b/installer/data/mysql/mandatory/sample_notices_message_transports.sql >index 55ed683d6bc..977e59f5eae 100644 >--- a/installer/data/mysql/mandatory/sample_notices_message_transports.sql >+++ b/installer/data/mysql/mandatory/sample_notices_message_transports.sql >@@ -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"); >-- >2.30.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 23781
:
93905
|
104984
|
131702
|
132044
|
140242
|
140244
|
147107
|
148248
|
148260
|
150430
|
150441
|
155346
|
158696
|
158697
|
158698
|
159013
|
159014
|
159015
|
162377
|
162378
|
162379
|
162380
|
165240
|
165241
|
165242
|
165593
|
165614
|
165615
|
165616
|
165617
|
169201
|
169202
|
169203
|
169204
|
169205