summaryrefslogtreecommitdiff
path: root/app/models/project_services/jira_service.rb
diff options
context:
space:
mode:
authorJarka Košanová <jarka@gitlab.com>2019-06-26 16:03:57 +0200
committerJarka Košanová <jarka@gitlab.com>2019-07-02 15:00:27 +0200
commitddbbf453c76144ac60c67e783424faf843c8efa1 (patch)
tree028cd360ebcae9582ac05a4b13ba2005621c534a /app/models/project_services/jira_service.rb
parent0e8b76e1918a7ca441e9eb98819f10da24e0588a (diff)
downloadgitlab-ce-ddbbf453c76144ac60c67e783424faf843c8efa1.tar.gz
Use title and description fields for issue trackers63690-issue-trackers-title
- instead of using properties - backward compatibility has to be kept for now
Diffstat (limited to 'app/models/project_services/jira_service.rb')
-rw-r--r--app/models/project_services/jira_service.rb19
1 files changed, 5 insertions, 14 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index f31eb7fd19a..a3b89b2543a 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -17,7 +17,7 @@ class JiraService < IssueTrackerService
# Jira Cloud version is deprecating authentication via username and password.
# We should use username/password for Jira Server and email/api_token for Jira Cloud,
# for more information check: https://gitlab.com/gitlab-org/gitlab-ce/issues/49936.
- prop_accessor :username, :password, :url, :api_url, :jira_issue_transition_id, :title, :description
+ prop_accessor :username, :password, :url, :api_url, :jira_issue_transition_id
before_update :reset_password
@@ -37,7 +37,6 @@ class JiraService < IssueTrackerService
def initialize_properties
super do
self.properties = {
- title: issues_tracker['title'],
url: issues_tracker['url'],
api_url: issues_tracker['api_url']
}
@@ -74,20 +73,12 @@ class JiraService < IssueTrackerService
[Jira service documentation](#{help_page_url('user/project/integrations/jira')})."
end
- def title
- if self.properties && self.properties['title'].present?
- self.properties['title']
- else
- 'Jira'
- end
+ def default_title
+ 'Jira'
end
- def description
- if self.properties && self.properties['description'].present?
- self.properties['description']
- else
- s_('JiraService|Jira issue tracker')
- end
+ def default_description
+ s_('JiraService|Jira issue tracker')
end
def self.to_param