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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
76842aac
Commit
76842aac
authored
Mar 10, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly move over `issues_tracker_id` from old custom issue tracker URLs.
parent
e0caed91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/models/project_services/issue_tracker_service.rb
app/models/project_services/issue_tracker_service.rb
+6
-6
No files found.
app/models/project_services/issue_tracker_service.rb
View file @
76842aac
...
...
@@ -60,9 +60,9 @@ class IssueTrackerService < Service
if
enabled_in_gitlab_config
self
.
properties
=
{
title:
issues_tracker
[
'title'
],
project_url:
set_project_url
,
issues_url:
issues_tracker
[
'issues_url'
]
,
new_issue_url:
issues_tracker
[
'new_issue_url'
]
project_url:
add_issues_tracker_id
(
issues_tracker
[
'project_url'
])
,
issues_url:
add_issues_tracker_id
(
issues_tracker
[
'issues_url'
])
,
new_issue_url:
add_issues_tracker_id
(
issues_tracker
[
'new_issue_url'
])
}
else
self
.
properties
=
{}
...
...
@@ -111,15 +111,15 @@ class IssueTrackerService < Service
Gitlab
.
config
.
issues_tracker
[
to_param
]
end
def
set_project_url
def
add_issues_tracker_id
(
url
)
if
self
.
project
id
=
self
.
project
.
issues_tracker_id
if
id
issues_tracker
[
'project_url'
]
.
gsub
(
":issues_tracker_id"
,
id
)
url
=
url
.
gsub
(
":issues_tracker_id"
,
id
)
end
end
issues_tracker
[
'project_url'
]
url
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