Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2018-03-16 22:09:35 +0300
committerFelipe Artur <felipefac@gmail.com>2018-03-19 22:36:16 +0300
commit2ee197086a87d22c9203c9a3642f9db6d40f54c4 (patch)
treeed17b26860649febb1acf2a38764fb9080a03f04 /app/models/project_services
parent9fd2d9ea243e8691c7a7aa9575256ac636d59792 (diff)
Improve JIRA event descriptions
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/jira_service.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index 601a6a077f5..ed4bbfb6cfc 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -14,9 +14,8 @@ class JiraService < IssueTrackerService
alias_method :project_url, :url
- # This is confusing, but JiraService does not really support these events.
- # The values here are required to display correct options in the service
- # configuration screen.
+ # When these are false GitLab does not create cross reference
+ # comments on JIRA except when an issue gets transitioned.
def self.supported_events
%w(commit merge_request)
end
@@ -318,4 +317,13 @@ class JiraService < IssueTrackerService
url_changed?
end
+
+ def self.event_description(event)
+ case event
+ when "merge_request", "merge_request_events"
+ "JIRA comments will be created when an issue gets referenced in a merge request."
+ when "commit", "commit_events"
+ "JIRA comments will be created when an issue gets referenced in a commit."
+ end
+ end
end