Project

General

Profile

Actions

Patch #2015

closed

sort by name in select box to add user to project.

Added by Yuki Shida about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Start date:
2008-10-09
Due date:
% Done:

0%

Estimated time:

Description

Pull-down to add user to project is sorted by ID.
This patch changes sort rule; sort by name.

--- app/views/projects/settings/_members.rhtml  (リビジョン 23)
+++ app/views/projects/settings/_members.rhtml  (リビジョン 24)
@@ -43,7 +43,7 @@
 <% if authorize_for('members', 'new') && !users.empty? %>
   <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :
id => @project}, :method => :post) do |f| %>
     <p><label for="member_user_id"><%=l(:label_member_new)%></label><br />
-    <%= f.select :user_id, users.collect{|user| [user.name, user.id]} %>
+    <%= f.select :user_id, users.collect{|user| [user.name, user.id]}.sort_by { |arr| arr[0] 
} %>
     <%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]},
 :selected => nil %>
     <%= submit_tag l(:button_add) %></p>
   <% end %>

Related issues

Related to Redmine - Feature #1880: Some Assign To improvementsClosed2008-09-10

Actions
Related to Redmine - Patch #1708: 'Assigned to' list sorts by id, not nameClosed2008-07-29

Actions
Related to Redmine - Feature #1413: Alphabetical Sorting of Drop-Down ListsClosed2008-06-09

Actions
Related to Redmine - Defect #2170: User display format isn't previewing the formatClosed2008-11-13

Actions
Actions

Also available in: Atom PDF