diff --git a/app/models/helpdesk_mail_support.rb b/app/models/helpdesk_mail_support.rb index 812a73e..112e692 100644 --- a/app/models/helpdesk_mail_support.rb +++ b/app/models/helpdesk_mail_support.rb @@ -180,6 +180,7 @@ class HelpdeskMailSupport < MailHandler text = text.gsub(/\{%ticket.start_date%\}/, issue.start_date ? ApplicationHelper.format_date(issue.start_date) : '') text = text.gsub(/\{%ticket.public_url%\}/, full_url(URL_HELPER.public_ticket_path(issue.helpdesk_ticket.id, issue.helpdesk_ticket.token))) if text.match(/\{%ticket.public_url%\}/) && issue.helpdesk_ticket text = text.gsub(/%%NOTE_AUTHOR.JOB_TITLE%%|\{%response.author.job_title%\}/, Contact.where(email: journal_user.mail).pluck(:job_title).join('')) if journal_user + text = text.gsub(/%%NOTE_AUTHOR.COMPANY%%|\{%response.author.company%\}/, Contact.where(email: journal_user.mail).pluck(:company).join('')) if journal_user if RedmineHelpdesk.vote_allow? text = text.gsub(/\{%ticket.voting%\}/, full_url(URL_HELPER.helpdesk_votes_show_path(issue.helpdesk_ticket.id, issue.helpdesk_ticket.token))) if text.match(/\{%ticket.voting%\}/) text = text.gsub(/\{%ticket.voting.good%\}/, full_url(URL_HELPER.helpdesk_votes_fast_vote_path(issue.helpdesk_ticket.id, 2, issue.helpdesk_ticket.token))) if text.match(/\{%ticket.voting.good%\}/) diff --git a/lib/redmine_helpdesk.rb b/lib/redmine_helpdesk.rb index d8d7421..3b41bc8 100644 --- a/lib/redmine_helpdesk.rb +++ b/lib/redmine_helpdesk.rb @@ -32,7 +32,7 @@ class HelpdeskSettings {%ticket.project%} {%ticket.subject%} {%ticket.quoted_description%} {%ticket.history%} {%ticket.status%} {%ticket.priority%} {%ticket.estimated_hours%} {%ticket.done_ratio%} {%ticket.public_url%} {%ticket.closed_on%} {%ticket.due_date%} {%ticket.start_date%} {%ticket.voting%} {%ticket.voting.good%} {%ticket.voting.okay%} {%ticket.voting.bad%} - {%response.author%} {%response.author.first_name%} {%response.author.last_name%} {%response.author.job_title%}) + {%response.author%} {%response.author.first_name%} {%response.author.last_name%} {%response.author.job_title%} {%response.author.company%}) FROM_MACRO_LIST = %w({%response.author%} {%response.author.first_name%})