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
7311b53a
Commit
7311b53a
authored
Mar 29, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Multiple Issue Assignee] Fix issue filters
parent
985f8b1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
app/controllers/concerns/issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+1
-1
app/finders/issues_finder.rb
app/finders/issues_finder.rb
+17
-3
No files found.
app/controllers/concerns/issuable_collections.rb
View file @
7311b53a
...
@@ -40,7 +40,7 @@ module IssuableCollections
...
@@ -40,7 +40,7 @@ module IssuableCollections
end
end
def
issues_collection
def
issues_collection
issues_finder
.
execute
.
preload
(
:project
,
:author
,
:
assignees
,
:
labels
,
:milestone
,
project: :namespace
)
issues_finder
.
execute
.
preload
(
:project
,
:author
,
:labels
,
:milestone
,
project: :namespace
)
end
end
def
merge_requests_collection
def
merge_requests_collection
...
...
app/finders/issues_finder.rb
View file @
7311b53a
...
@@ -26,12 +26,26 @@ class IssuesFinder < IssuableFinder
...
@@ -26,12 +26,26 @@ class IssuesFinder < IssuableFinder
IssuesFinder
.
not_restricted_by_confidentiality
(
current_user
)
IssuesFinder
.
not_restricted_by_confidentiality
(
current_user
)
end
end
def
by_assignee
(
items
)
if
assignee
items
=
items
.
where
(
"issue_assignees.user_id = ?"
,
assignee
.
id
)
elsif
no_assignee?
items
=
items
.
where
(
"issue_assignees.user_id is NULL"
)
elsif
assignee_id?
||
assignee_username?
# assignee not found
items
=
items
.
none
end
items
end
def
self
.
not_restricted_by_confidentiality
(
user
)
def
self
.
not_restricted_by_confidentiality
(
user
)
return
Issue
.
where
(
'issues.confidential IS NULL OR issues.confidential IS FALSE'
)
if
user
.
blank?
issues
=
Issue
.
with_assignees
return
issues
.
where
(
'issues.confidential IS NULL OR issues.confidential IS FALSE'
)
if
user
.
blank?
return
Issue
.
all
if
user
.
admin_or_auditor?
return
issues
.
all
if
user
.
admin_or_auditor?
Issue
.
with_assigne
es
.
where
(
'
issu
es
.
where
(
'
issues.confidential IS NULL
issues.confidential IS NULL
OR issues.confidential IS FALSE
OR issues.confidential IS FALSE
OR (issues.confidential = TRUE
OR (issues.confidential = TRUE
...
...
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