Bug 18915: (QA follow-up) Add note for installs after 17.05
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 12 Jan 2018 10:31:42 +0000 (11:31 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 15 Jan 2018 15:14:00 +0000 (12:14 -0300)
Since the 17.05 upgrade adds the note and the sql file did not yet include
the note, we should add it when it is not there (for example new 17.11s).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by running the dbrev while there is a letter and while not.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql

index 80035b2..8fd6b6e 100644 (file)
@@ -1 +1,4 @@
+-- For installations having the note already
 UPDATE letter SET code = 'CHECKOUT_NOTE', name = 'Checkout note on item set by patron', title = 'Checkout note', content = REPLACE(content, "<<biblio.item>>", "<<biblio.title>>") WHERE code = 'PATRON_NOTE';
+-- For installations coming from 17.11
+INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email');