|
Line 0
Link Here
|
|
|
1 |
use Modern::Perl; |
| 2 |
|
| 3 |
return { |
| 4 |
bug_number => "30515", |
| 5 |
description => "Add system preferences for patron specific overdue notice preferences", |
| 6 |
up => sub { |
| 7 |
my ($args) = @_; |
| 8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
| 9 |
|
| 10 |
$dbh->do( |
| 11 |
q{ |
| 12 |
INSERT IGNORE INTO `message_attributes` |
| 13 |
(`message_attribute_id`, `message_name`, `takes_days`) |
| 14 |
VALUES |
| 15 |
(15, 'Overdue1', 0), |
| 16 |
(16, 'Overdue2', 0), |
| 17 |
(17, 'Overdue3', 0) |
| 18 |
} |
| 19 |
); |
| 20 |
say $out "Message attributes for overdue notices added"; |
| 21 |
|
| 22 |
$dbh->do( |
| 23 |
q{ |
| 24 |
INSERT IGNORE INTO `message_transports` |
| 25 |
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`) |
| 26 |
VALUES |
| 27 |
(15, 'email', 0, 'circulation', 'ODUE'), |
| 28 |
(15, 'sms', 0, 'circulation', 'ODUE'), |
| 29 |
(16, 'email', 0, 'circulation', 'ODUE2'), |
| 30 |
(16, 'sms', 0, 'circulation', 'ODUE2'), |
| 31 |
(17, 'email', 0, 'circulation', 'ODUE3'), |
| 32 |
(17, 'sms', 0, 'circulation', 'ODUE3') |
| 33 |
} |
| 34 |
); |
| 35 |
say $out "Message transports for overdue notices added"; |
| 36 |
|
| 37 |
$dbh->do( |
| 38 |
q{ |
| 39 |
INSERT IGNORE INTO systempreferences |
| 40 |
(`variable`, `value`, `options`, `explanation`, `type`) |
| 41 |
VALUES ( |
| 42 |
'UsePatronPreferencesForOverdueNotices', |
| 43 |
'0', |
| 44 |
NULL, |
| 45 |
'Use patron specific messaging preferences for overdue notices if available', |
| 46 |
'YesNo' |
| 47 |
) |
| 48 |
} |
| 49 |
); |
| 50 |
say $out "UsePatronPreferencesForOverdueNotices system preference added"; |
| 51 |
|
| 52 |
$dbh->do( |
| 53 |
q{ |
| 54 |
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) |
| 55 |
VALUES ( |
| 56 |
'UsePatronPreferencesForOverdueNoticesPrint', |
| 57 |
'always', |
| 58 |
'always|fallback|never', |
| 59 |
'When to send print notices when using patron specific messaging preferences for overdue notices', |
| 60 |
'Choice' |
| 61 |
) |
| 62 |
} |
| 63 |
); |
| 64 |
say $out "UsePatronPreferencesForOverdueNoticesPrint system preference added"; |
| 65 |
}, |
| 66 |
} |