Fix mail notification if author changed

This commit is contained in:
Alexander Meindl 2019-04-09 14:46:44 +02:00
parent 263053a610
commit 195038a0ff
3 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,12 @@
Changelog Changelog
========= =========
2.0.21
++++++
- fix mail notification if issue author changed
2.0.20 2.0.20
++++++ ++++++

View File

@ -4,7 +4,7 @@ Redmine::Plugin.register :additionals do
name 'Additionals' name 'Additionals'
author 'AlphaNodes GmbH' author 'AlphaNodes GmbH'
description 'Customizing Redmine, providing wiki macros and act as a library/function provider for other Redmine plugins' description 'Customizing Redmine, providing wiki macros and act as a library/function provider for other Redmine plugins'
version '2.0.20' version '2.0.21-master'
author_url 'https://alphanodes.com/' author_url 'https://alphanodes.com/'
url 'https://github.com/alphanodes/additionals' url 'https://github.com/alphanodes/additionals'

View File

@ -23,11 +23,11 @@ module Additionals
render_on(:view_users_show_contextual, partial: 'users/additionals_contextual') render_on(:view_users_show_contextual, partial: 'users/additionals_contextual')
def helper_issues_show_detail_after_setting(context = {}) def helper_issues_show_detail_after_setting(context = {})
d = context[:detail] detail = context[:detail]
return unless d.prop_key == 'author_id' return unless detail.prop_key == 'author_id'
d[:value] = find_name_by_reflection('author', d.value) detail[:value] = find_name_by_reflection('author', detail.value) || detail.value
d[:old_value] = find_name_by_reflection('author', d.old_value) detail[:old_value] = find_name_by_reflection('author', detail.old_value) || detail.old_value
end end
end end
end end