Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
737f6516
Commit
737f6516
authored
Jan 23, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update new services with initialization based on existing data.
parent
e9d6d1e5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
app/models/project_services/custom_issue_tracker_service.rb
app/models/project_services/custom_issue_tracker_service.rb
+1
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+11
-1
app/models/project_services/redmine_service.rb
app/models/project_services/redmine_service.rb
+10
-1
No files found.
app/models/project_services/custom_issue_tracker_service.rb
View file @
737f6516
...
@@ -19,7 +19,7 @@ class CustomIssueTrackerService < IssueTrackerService
...
@@ -19,7 +19,7 @@ class CustomIssueTrackerService < IssueTrackerService
end
end
def
to_param
def
to_param
title
.
parameterize
'custom_issue_tracker'
end
end
def
fields
def
fields
...
...
app/models/project_services/jira_service.rb
View file @
737f6516
...
@@ -37,7 +37,7 @@ class JiraService < IssueTrackerService
...
@@ -37,7 +37,7 @@ class JiraService < IssueTrackerService
if
enabled_in_gitlab_config
if
enabled_in_gitlab_config
self
.
properties
=
{
self
.
properties
=
{
title:
issues_tracker
[
'title'
],
title:
issues_tracker
[
'title'
],
project_url:
issues_tracker
[
'project_url'
]
,
project_url:
set_project_url
,
issues_url:
issues_tracker
[
'issues_url'
],
issues_url:
issues_tracker
[
'issues_url'
],
new_issue_url:
issues_tracker
[
'new_issue_url'
]
new_issue_url:
issues_tracker
[
'new_issue_url'
]
}
}
...
@@ -56,4 +56,14 @@ class JiraService < IssueTrackerService
...
@@ -56,4 +56,14 @@ class JiraService < IssueTrackerService
def
issues_tracker
def
issues_tracker
Gitlab
.
config
.
issues_tracker
[
'jira'
]
Gitlab
.
config
.
issues_tracker
[
'jira'
]
end
end
def
set_project_url
id
=
self
.
project
.
issues_tracker_id
if
id
issues_tracker
[
'project_url'
].
gsub
(
":issues_tracker_id"
,
id
)
else
issues_tracker
[
'project_url'
]
end
end
end
end
app/models/project_services/redmine_service.rb
View file @
737f6516
...
@@ -27,7 +27,7 @@ class RedmineService < IssueTrackerService
...
@@ -27,7 +27,7 @@ class RedmineService < IssueTrackerService
if
enabled_in_gitlab_config
if
enabled_in_gitlab_config
self
.
properties
=
{
self
.
properties
=
{
title:
issues_tracker
[
'title'
],
title:
issues_tracker
[
'title'
],
project_url:
issues_tracker
[
'project_url'
]
,
project_url:
set_project_url
,
issues_url:
issues_tracker
[
'issues_url'
],
issues_url:
issues_tracker
[
'issues_url'
],
new_issue_url:
issues_tracker
[
'new_issue_url'
]
new_issue_url:
issues_tracker
[
'new_issue_url'
]
}
}
...
@@ -46,4 +46,13 @@ class RedmineService < IssueTrackerService
...
@@ -46,4 +46,13 @@ class RedmineService < IssueTrackerService
def
issues_tracker
def
issues_tracker
Gitlab
.
config
.
issues_tracker
[
'redmine'
]
Gitlab
.
config
.
issues_tracker
[
'redmine'
]
end
end
def
set_project_url
id
=
self
.
project
.
issue_tracker_id
if
id
issues_tracker
[
'project_url'
].
gsub
(
":issue_tracker_id"
,
id
)
else
issues_tracker
[
'project_url'
]
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment