Commit fdf7fc04 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make it possible to assign/mention users from group members

parent ede746bf
......@@ -101,7 +101,7 @@ class ProjectsController < ProjectResourceController
@suggestions = {
emojis: Emoji.names,
issues: @project.issues.select([:id, :title, :description]),
members: @project.users.select([:username, :name]).order(:username)
members: @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
}
respond_to do |format|
......
......@@ -40,12 +40,12 @@
= f.label :assignee_id do
%i.icon-user
Assign to
.input= f.select(:assignee_id, @project.users.alphabetically.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
.input= f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
.left
= f.label :milestone_id do
%i.icon-time
Milestone
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
.input= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
.control-group
......
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