diff options
author | Sean McGivern <sean@gitlab.com> | 2017-11-06 13:48:34 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-11-06 14:40:13 +0000 |
commit | 5e7d68ef798c110204351ec089acd896271c4315 (patch) | |
tree | 600b43cafb3cb4ef3a5fa7768230d4c26f912240 /app/models/project_services | |
parent | cfc932cad10b1d6c494222e9d91aa75583b56145 (diff) | |
download | gitlab-ce-5e7d68ef798c110204351ec089acd896271c4315.tar.gz |
Fix issue reopen Mattermost / Slack message39791-when-reopening-an-issue-the-mattermost-notification-has-no-context-to-the-issue
When an issue is reopened, the action is 'reopen', but the state is 'opened' (as
we don't have a separate 'reopened' state any more).
Because we checked the action in one method and the state in another, this lead
to a weird case where the mesage neither linked to the issue, nor contained an
attachment with its details. Just checking the action is fine, as it's the most
granular.
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/chat_message/issue_message.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_services/chat_message/issue_message.rb b/app/models/project_services/chat_message/issue_message.rb index 1327b075858..3273f41dbd2 100644 --- a/app/models/project_services/chat_message/issue_message.rb +++ b/app/models/project_services/chat_message/issue_message.rb @@ -39,7 +39,7 @@ module ChatMessage private def message - if state == 'opened' + if opened_issue? "[#{project_link}] Issue #{state} by #{user_combined_name}" else "[#{project_link}] Issue #{issue_link} #{state} by #{user_combined_name}" |