From cd00d1835032961f15ab2908445bd45c42ea1922 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 7 May 2024 17:45:08 +0100 Subject: [PATCH] Bug 36758: Add TICKET_ASSIGNED notice This patch adds a new default TICKET_ASSIGNED notice to be used with catalog concerns to notice the assigned staff user when a ticket has been assigned to them. Test plan 1) Run the database update and confirm that the new notice has been added to the database (If on the sandboxes, skip to the next patch) Signed-off-by: David Nind --- installer/data/mysql/atomicupdate/bug_36757.pl | 16 ++++++++++++++++ .../data/mysql/en/mandatory/sample_notices.yml | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_36757.pl diff --git a/installer/data/mysql/atomicupdate/bug_36757.pl b/installer/data/mysql/atomicupdate/bug_36757.pl new file mode 100755 index 0000000000..00a531ff6b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36757.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "36757", + description => "Notify assignee when a concern is assigned to them", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) VALUES ("catalogue", "TICKET_ASSIGNED", "", "Concern assigned notification", 1, "Catalog concern assigned", "email", "default", "[%- PROCESS 'html_helpers.inc' -%][%- USE Koha -%]Dear cataloger,
[%- INCLUDE 'patron-title.inc' patron => libraian -%] has assigned the following concern with [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 0 -%] to you

[%- ticket.body -%]

You can action this concern from the concern management page.")} + ); + + say $out "Added notice 'TICKET_ASSIGNED'"; + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 9675b3eb4f..4badb41e1b 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -62,6 +62,24 @@ tables: - "
" - "Thank you" + - module: catalogue + code: TICKET_ASSIGNED + branchcode: "" + name: "Concern assigned notification" + is_html: 1 + title: "Catalog concern assigned" + message_transport_type: email + lang: default + content: + - "[%- PROCESS 'html_helpers.inc' -%]" + - "[%- USE Koha -%]" + - "Dear cataloger,
" + - "[%- INCLUDE 'patron-title.inc' patron => libraian -%] has assigned the following concern with [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 0 -%] to you
" + - "
" + - "[%- ticket.body -%]
" + - "
" + - "You can action this concern from the concern management page." + - module: catalogue code: TICKET_RESOLVE branchcode: "" -- 2.39.2