项目issue功能,增加所有人与完成度筛选条件

This commit is contained in:
daiao 2016-09-25 14:35:38 +08:00
parent 144814c11c
commit a8ed5ebb63
2 changed files with 16 additions and 6 deletions

View File

@ -255,16 +255,18 @@ module QueriesHelper
# Give it a name, required to be valid
@query = IssueQuery.new(:name => "_")
@query.project = @project
params[:f] = %w(subject tracker_id status_id priority_id assigned_to_id fixed_version_id created_on) unless params[:status_id].nil?
params[:f] = %w(subject tracker_id status_id priority_id done_ratio assigned_to_id fixed_version_id created_on) unless params[:status_id].nil?
params[:op] = {'subject' => "~" ,
'status_id' => ( params[:status_id] == '0' ? "!":"=" ),
'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ),
'done_ratio' => ( params[:done_ratio] == '0' ? "!":"=" ),
'tracker_id' => ( params[:tracker_id] == '0' ? "!":"=" ),
'fixed_version_id' => ( params[:fixed_version_id] == '0' ? "!":"=" ),
'assigned_to_id' => ( params[:assigned_to_id] == '0' ? "!":"=" )} unless params[:status_id].nil?
params[:v] = {'subject' => [params[:subject]],
'status_id' => [params[:status_id]],
'priority_id' => [params[:priority_id]],
'done_ratio' => [params[:done_ratio]],
'tracker_id' => [params[:tracker_id]],
'fixed_version_id' => [params[:fixed_version_id]],
'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil?

View File

@ -121,7 +121,7 @@
<div class="issues_con_list" style="position: relative;">
<ul id="issues_list_nav" >
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);">
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);nh_reset_form();">
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有<span class="issues_nav_tag ml5"><%= @project.project_score.issue_num %></span></a>
</li>
<li id="issues_list_nav_2" onclick="HoverLi(2);">
@ -138,25 +138,33 @@
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
},
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"w90 mr18"}
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"}
)
%>
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
{ :include_blank => false,:selected=>@priority_id ? @priority_id : 0
},
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"priority_id",:class=>"w90 mr18"}
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"priority_id",:class=>"fl"}
)
%>
<%#= select(:issue, :done_ratio, [["10%",1],["20%",2],["30%",3],["40%",4],["50%",5],["60%",6],["70%",7],["80%",8],["90%",9],["100%",10]].unshift(["完成度",0]),
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0 },
{:onchange => "remote_function();", :id => "done_ratio", :name => "done_ratio", :class => "f1"}) %>
<%= select( :issue,:done_ratio, ((1..10).to_a.collect { |r| ["#{r*10} %", r*10] }).unshift(["完成度",0]),
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
{:onchange=>"remote_function();",:id=>"done_ratio",:name=>"done_ratio",:class=>"fl"}) %>
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
},
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"w90 mr18"}
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl"}
)
%>
<%= select(:issue, :tracker, [["缺陷",1],["功能",2],["支持",3],["任务",4],["周报",5]].unshift(["类型",0]),
{:include_blank => false, :selected => @tracker_id ? @tracker_id : 0},
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl issues_filter_select_min"}) %>
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl"}) %>
<%= select(:issue, :fixed_version, options_for_version_isuue_list(@project),
{:include_blank => false, :selected => @fixed_version_id ? @fixed_version_id : 0},