diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-21 17:13:14 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-04-25 15:28:24 -0400 |
commit | ef340f6e777875e1bbb38752e64ba7bea3ab2f31 (patch) | |
tree | 7a190b13b4128ba086224023253e53f605e9b10d /app/models/project_services/jira_service.rb | |
parent | b79c5c40e18086f10b849d069bc1c496a851cbae (diff) | |
download | gitlab-ce-ef340f6e777875e1bbb38752e64ba7bea3ab2f31.tar.gz |
Ensure URL in all Service subclasses are valid
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/project_services/jira_service.rb')
-rw-r--r-- | app/models/project_services/jira_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index 1ed42c4f3e7..b4418ba9284 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -28,6 +28,8 @@ class JiraService < IssueTrackerService prop_accessor :username, :password, :api_url, :jira_issue_transition_id, :title, :description, :project_url, :issues_url, :new_issue_url + validates :api_url, presence: true, url: true, if: :activated? + before_validation :set_api_url, :set_jira_issue_transition_id before_update :reset_password |