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
4ecc10fa
Commit
4ecc10fa
authored
May 25, 2016
by
DJ Mountney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce the filters on the todos joins project query by being explicit about the join
parent
c3e923c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
app/finders/todos_finder.rb
app/finders/todos_finder.rb
+7
-1
No files found.
app/finders/todos_finder.rb
View file @
4ecc10fa
...
@@ -23,7 +23,13 @@ class TodosFinder
...
@@ -23,7 +23,13 @@ class TodosFinder
end
end
def
execute
def
execute
items
=
current_user
.
todos
.
joins
(
:project
).
where
(
projects:
{
pending_delete:
false
})
items
=
current_user
.
todos
# Filter out todos linked to project pending deletion
items
=
items
.
joins
(
'INNER JOIN projects ON projects.id = todos.project_id AND projects.pending_delete = false'
)
items
=
by_action_id
(
items
)
items
=
by_action_id
(
items
)
items
=
by_author
(
items
)
items
=
by_author
(
items
)
items
=
by_project
(
items
)
items
=
by_project
(
items
)
...
...
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