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
68f73024
Commit
68f73024
authored
Jan 28, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a scope for visible services, code styling changes for easier readability.
parent
c6c7552e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
app/models/project.rb
app/models/project.rb
+1
-5
app/models/project_services/gitlab_issue_tracker_service.rb
app/models/project_services/gitlab_issue_tracker_service.rb
+1
-1
app/models/service.rb
app/models/service.rb
+2
-0
No files found.
app/controllers/projects/services_controller.rb
View file @
68f73024
...
...
@@ -9,7 +9,7 @@ class Projects::ServicesController < Projects::ApplicationController
def
index
@project
.
build_missing_services
@services
=
@project
.
services
.
where
.
not
(
type:
'GitlabIssueTrackerService'
)
.
reload
@services
=
@project
.
services
.
visible
.
reload
end
def
edit
...
...
app/models/project.rb
View file @
68f73024
...
...
@@ -317,11 +317,7 @@ class Project < ActiveRecord::Base
end
def
default_issue_tracker
unless
gitlab_issue_tracker_service
create_gitlab_issue_tracker_service
end
gitlab_issue_tracker_service
gitlab_issue_tracker_service
||=
create_gitlab_issue_tracker_service
end
def
issues_tracker
...
...
app/models/project_services/gitlab_issue_tracker_service.rb
View file @
68f73024
...
...
@@ -20,6 +20,6 @@ class GitlabIssueTrackerService < IssueTrackerService
end
def
issue_url
(
iid
)
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
project_issue_path
project_id:
project
,
id:
iid
}
"
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
project_issue_path
(
project_id:
project
,
id:
iid
)
}
"
end
end
app/models/service.rb
View file @
68f73024
...
...
@@ -26,6 +26,8 @@ class Service < ActiveRecord::Base
validates
:project_id
,
presence:
true
scope
:visible
,
->
{
where
.
not
(
type:
'GitlabIssueTrackerService'
)
}
def
activated?
active
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