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
f3d6d556
Commit
f3d6d556
authored
Aug 26, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'improve_in_epics_scope' into 'master'
Improve in_epics scope See merge request gitlab-org/gitlab!40203
parents
375bdf66
83749c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+1
-4
No files found.
ee/app/models/ee/issue.rb
View file @
f3d6d556
...
...
@@ -23,10 +23,7 @@ module EE
scope
:order_weight_asc
,
->
{
reorder
::
Gitlab
::
Database
.
nulls_last_order
(
'weight'
)
}
scope
:no_epic
,
->
{
left_outer_joins
(
:epic_issue
).
where
(
epic_issues:
{
epic_id:
nil
})
}
scope
:any_epic
,
->
{
joins
(
:epic_issue
)
}
scope
:in_epics
,
->
(
epics
)
do
issue_ids
=
EpicIssue
.
where
(
epic_id:
epics
).
select
(
:issue_id
)
id_in
(
issue_ids
)
end
scope
:in_epics
,
->
(
epics
)
{
joins
(
:epic_issue
).
where
(
epic_issues:
{
epic_id:
epics
})
}
scope
:no_iteration
,
->
{
where
(
sprint_id:
nil
)
}
scope
:any_iteration
,
->
{
where
.
not
(
sprint_id:
nil
)
}
scope
:in_iterations
,
->
(
iterations
)
{
where
(
sprint_id:
iterations
)
}
...
...
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