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
726dd584
Commit
726dd584
authored
7 years ago
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move new Issue relations to EE namespace
parent
cc441566
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
app/models/ee/issue.rb
app/models/ee/issue.rb
+9
-0
app/models/issue.rb
app/models/issue.rb
+0
-6
No files found.
app/models/ee/issue.rb
View file @
726dd584
module
EE
module
Issue
extend
ActiveSupport
::
Concern
prepended
do
has_many
:referenced_issue_links
,
class_name:
'IssueLink'
,
foreign_key: :source_id
,
dependent: :destroy
has_many
:referred_by_issue_links
,
class_name:
'IssueLink'
,
foreign_key: :target_id
,
dependent: :destroy
has_many
:referenced_issues
,
through: :referenced_issue_links
,
source: :target
has_many
:referred_by_issues
,
through: :referred_by_issue_links
,
source: :source
end
# override
def
check_for_spam?
author
.
support_bot?
||
super
...
...
This diff is collapsed.
Click to expand it.
app/models/issue.rb
View file @
726dd584
...
...
@@ -35,12 +35,6 @@ class Issue < ActiveRecord::Base
has_many
:issue_assignees
has_many
:assignees
,
class_name:
"User"
,
through: :issue_assignees
has_many
:referenced_issue_links
,
class_name:
'IssueLink'
,
foreign_key: :source_id
,
dependent: :destroy
has_many
:referred_by_issue_links
,
class_name:
'IssueLink'
,
foreign_key: :target_id
,
dependent: :destroy
has_many
:referenced_issues
,
through: :referenced_issue_links
,
source: :target
has_many
:referred_by_issues
,
through: :referred_by_issue_links
,
source: :source
validates
:project
,
presence:
true
scope
:in_projects
,
->
(
project_ids
)
{
where
(
project_id:
project_ids
)
}
...
...
This diff is collapsed.
Click to expand it.
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