socialforge/app/views/versions/_issue_statistics.html.erb

29 lines
1.2 KiB
Plaintext

<table class="new_roadmap_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>指派给</th>
<th>全部</th>
<th>完成</th>
<th>关闭</th>
<th>待完成</th>
</tr>
</thead>
<tbody>
<% @version_issue_assigned_name.each do | assigned | %>
<tr>
<td><%= User.find(assigned[0]).show_name %></td>
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0]).count %></td>
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 3).count %></td>
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 5).count %></td>
<td><%= Issue.where(fixed_version_id: @version.id, assigned_to_id: assigned[0], status_id: [1,2,4]).count %></td>
</tr>
<% end %>
<tr>
<td>Total</td>
<td><%= Issue.where(:fixed_version_id => @version.id).count %> </td>
<td><%= Issue.where(:fixed_version_id => @version.id, :status_id => 3).count %></td>
<td><%= Issue.where(:fixed_version_id => @version.id, :status_id => 5).count %></td>
<td><%= Issue.where(fixed_version_id: @version.id, status_id: [1,2,4]).count %></td>
</tr>
</tbody>
</table>