diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index ed9c4638f..7b4695d3c 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -125,7 +125,8 @@ class VersionsController < ApplicationController
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
# @offset ||= @issue_pages.offset
@issues = paginateHelper @version_issues, @limit
- @version_issue_assigned_name = @version_issues.group_by(&:assigned_to_id)
+ @version_issue_assigned_name = @version_issues.sort_by{ |i| Issue.where(:project_id => @project.id ,
+ :assigned_to_id => i.assigned_to_id, :fixed_version_id => @version.id).count }.reverse.group_by(&:assigned_to_id)
format.html {
# @issues = @version.fixed_issues.visible.
# includes(:status, :tracker, :priority).
diff --git a/app/views/versions/_issue_statistics.html.erb b/app/views/versions/_issue_statistics.html.erb
index b8c0ff2e3..47d420a75 100644
--- a/app/views/versions/_issue_statistics.html.erb
+++ b/app/views/versions/_issue_statistics.html.erb
@@ -9,21 +9,21 @@
+
+ 合计 |
+ <%= Issue.where(:fixed_version_id => @version.id).count %> |
+ <%= Issue.where(:fixed_version_id => @version.id, :status_id => 3).count %> |
+ <%= Issue.where(:fixed_version_id => @version.id, :status_id => 5).count %> |
+ <%= Issue.where(fixed_version_id: @version.id, status_id: [1,2,4]).count %> |
+
<% @version_issue_assigned_name.each do | assigned | %>
- <%= User.find(assigned[0]).try(:show_name) %> |
+ <%= User.find(assigned[0]).try(:show_name).nil? ? "未指派" : User.find(assigned[0]).try(:show_name) %> |
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0]).count %> |
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 3).count %> |
<%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 5).count %> |
<%= Issue.where(fixed_version_id: @version.id, assigned_to_id: assigned[0], status_id: [1,2,4]).count %> |
<% end %>
-
- Total |
- <%= Issue.where(:fixed_version_id => @version.id).count %> |
- <%= Issue.where(:fixed_version_id => @version.id, :status_id => 3).count %> |
- <%= Issue.where(:fixed_version_id => @version.id, :status_id => 5).count %> |
- <%= Issue.where(fixed_version_id: @version.id, status_id: [1,2,4]).count %> |
-
\ No newline at end of file
diff --git a/app/views/versions/_new_milestone.html.erb b/app/views/versions/_new_milestone.html.erb
index 40fff71f2..b89936f3e 100644
--- a/app/views/versions/_new_milestone.html.erb
+++ b/app/views/versions/_new_milestone.html.erb
@@ -14,7 +14,7 @@