From d2d09ca7437f42a847315e116059a885b21cd245 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Sun, 9 Jul 2017 22:39:32 +0000 Subject: [PATCH] Bug 18915: Fix checkout note email message This patch changes patron_note to checkout_note in the appropriate places, and ensures the email gets the title of the item. To test: 1) Apply patch and update database 2) View the message_queue table in mysql 3) Check out an item if haven't already 4) Go to OPAC and set a checkout note for an item 5) View message_queue table and confirm it the title is included in the email and all instances of 'patron note' have been replaced with 'checkout note' 6) Disable javascript in browser 7) repeat steps 4 and 5 and confirm all works as expected Sponsored-by: Catalyst IT --- .../mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql | 1 + opac/opac-issue-note.pl | 2 +- opac/svc/patron_notes | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql diff --git a/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql b/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql new file mode 100644 index 0000000..cdaca56 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql @@ -0,0 +1 @@ +UPDATE letter SET code = 'CHECKOUT_NOTE', name = 'Checkout note on item set by patron', title = 'Checkout note', content = '<> <> has added a note to the item <> - <> (<>).' WHERE code = 'PATRON_NOTE'; diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl index becd708..c7bac1b 100755 --- a/opac/opac-issue-note.pl +++ b/opac/opac-issue-note.pl @@ -72,7 +72,7 @@ if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { my $branch = Koha::Libraries->find( $issue->branchcode ); my $letter = C4::Letters::GetPreparedLetter ( module => 'circulation', - letter_code => 'PATRON_NOTE', + letter_code => 'CHECKOUT_NOTE', branchcode => $branch, tables => { 'biblio' => $biblio->{biblionumber}, diff --git a/opac/svc/patron_notes b/opac/svc/patron_notes index d241f0c..573f908 100755 --- a/opac/svc/patron_notes +++ b/opac/svc/patron_notes @@ -82,7 +82,7 @@ if ($is_ajax) { my $biblio = GetBiblioFromItemNumber($issue->itemnumber); my $letter = C4::Letters::GetPreparedLetter ( module => 'circulation', - letter_code => 'PATRON_NOTE', + letter_code => 'CHECKOUT_NOTE', branchcode => $branch, tables => { 'biblio' => $biblio->{biblionumber}, -- 2.1.4