Commit 13ecbb04 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show only people who have assigned issues in assignee dropdown

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 0f134e54
...@@ -29,6 +29,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -29,6 +29,7 @@ class Projects::IssuesController < Projects::ApplicationController
sort_param = params[:sort] || 'newest' sort_param = params[:sort] || 'newest'
@sort = sort_param.humanize unless sort_param.empty? @sort = sort_param.humanize unless sort_param.empty?
@assignees = User.where(id: @project.issues.pluck(:assignee_id))
respond_to do |format| respond_to do |format|
format.html format.html
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
Any Any
= link_to project_filter_path(assignee_id: 0) do = link_to project_filter_path(assignee_id: 0) do
Unassigned Unassigned
- @project.team.members.sort_by(&:name).each do |user| - @assignees.sort_by(&:name).each do |user|
%li %li
= link_to project_filter_path(assignee_id: user.id) do = link_to project_filter_path(assignee_id: user.id) do
= image_tag avatar_icon(user.email), class: "avatar s16", alt: '' = image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment