Bug 5770: (QA follow-up) Allow feature to be disable
[koha.git] / installer / data / mysql / atomicupdate / bug_5770.perl
1 $DBversion = '18.12.00.XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3     $dbh->do( q{
4             INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES
5             ('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that will be sent new purchase suggestions','Choice'),
6             ('EmailAddressForSuggestions','','','If you choose EmailAddressForSuggestions you should enter a valid email address','free')
7     });
8
9     $dbh->do( q{
10             INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
11             ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pending approval</h3>
12                 <p><h4>Suggested by</h4>
13                     <ul>
14                         <li><<borrowers.firstname>> <<borrowers.surname>></li>
15                         <li><<borrowers.cardnumber>></li>
16                         <li><<borrowers.phone>></li>
17                         <li><<borrowers.email>></li>
18                     </ul>
19                 </p>
20                 <p><h4>Title suggested</h4>
21                     <ul>
22                         <li><b>Library:</b> <<branches.branchname>></li>
23                         <li><b>Title:</b> <<suggestions.title>></li>
24                         <li><b>Author:</b> <<suggestions.author>></li>
25                         <li><b>Copyright date:</b> <<suggestions.copyrightdate>></li>
26                         <li><b>Standard number (ISBN, ISSN or other):</b> <<suggestions.isbn>></li>
27                         <li><b>Publisher:</b> <<suggestions.publishercode>></li>
28                         <li><b>Collection title:</b> <<suggestions.collectiontitle>></li>
29                         <li><b>Publication place:</b> <<suggestions.place>></li>
30                         <li><b>Quantity:</b> <<suggestions.quantity>></li>
31                         <li><b>Item type:</b> <<suggestions.itemtype>></li>
32                         <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
33                         <li><b>Notes:</b> <<suggestions.note>></li>
34                     </ul>
35                 </p>',1, 'email')
36     });
37
38     # Always end with this (adjust the bug info)
39     SetVersion( $DBversion );
40     print "Upgrade to $DBversion done (Bug 5770 - Email librarian when purchase suggestion made)\n";
41 }