This adds the necessary SQL for holds notifications to work.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
('circulation','DUEDGST','Item Due Reminder (Digest)','Item Due Reminder','You have <<count>> items due'),
('circulation','PREDUE','Advance Notice of Item Due','Advance Notice of Item Due','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item will be due soon:\r\n\r\n<<items.content>>'),
('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
-('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.');
+('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.'),
+('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>');
values
(1, 'Item DUE', 0),
(2, 'Advance Notice', 1),
-(3, 'Upcoming Events', 1);
+(3, 'Upcoming Events', 1),
+(4, 'Hold Filled', 0);
(2, 'email', 0, 'circulation', 'PREDUE'),
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
(3, 'email', 0, 'circulation', 'EVENT'),
+(4, 'email', 0, 'reserves', 'HOLD'),
(1, 'sms', 0, 'circulation', 'DUE'),
(1, 'sms', 1, 'circulation', 'DUEDGST'),
(2, 'sms', 0, 'circulation', 'PREDUE'),
(2, 'sms', 1, 'circulation', 'PREDUEDGST'),
-(3, 'sms', 0, 'circulation', 'EVENT');
-
+(3, 'sms', 0, 'circulation', 'EVENT'),
+(4, 'sms', 0, 'reserves', 'HOLD');
print "Upgrade to $DBversion done (added OPACDisplayRequestPriority system preference)\n";
SetVersion ($DBversion);
}
+
+$DBversion = '3.01.00.005';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("
+ INSERT INTO `letter` (module, code, name, title, content)
+ VALUES('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>')
+ ");
+ $dbh->do("INSERT INTO `message_attributes` (message_attribute_id, message_name, takes_days) values(4, 'Hold Filled', 0)");
+ $dbh->do("INSERT INTO `message_transports` (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) values(4, 'sms', 0, 'reserves', 'HOLD')");
+ $dbh->do("INSERT INTO `message_transports` (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) values(4, 'email', 0, 'reserves', 'HOLD')");
+ print "Upgrade to $DBversion done (Add letter for holds notifications)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.004';
+ our $VERSION = '3.01.00.005';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install