This commit is contained in:
yutao 2015-05-22 16:38:26 +08:00
parent a6e15f5609
commit 9c84837492
1 changed files with 14 additions and 14 deletions

View File

@ -255,7 +255,7 @@ module QueriesHelper
# Give it a name, required to be valid
@query = IssueQuery.new(:name => "_")
@query.project = @project
params[:f] = %w(subject status_id priority_id author_id assigned_to_id created_on) unless params[:status_id].nil?
params[:f] = %w(subject status_id priority_id author_id assigned_to_id) unless params[:status_id].nil?
params[:op] = {'subject' => "~" ,
'status_id' => ( params[:status_id] == '0' ? "!":"=" ),
'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ),
@ -266,19 +266,19 @@ module QueriesHelper
'priority_id' => [params[:priority_id]],
'author_id' => [params[:author_id]],
'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil?
if(params[:status_id] != nil)
if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' &&
params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='' )
params[:op][:created_on]='><'
params[:v][:created_on]=[params[:issue_create_date_start],params[:issue_create_date_end]]
elsif(params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='')
params[:op][:created_on]='>='
params[:v][:created_on]=[params[:issue_create_date_start]]
elsif(params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='')
params[:op][:created_on]='<='
params[:v][:created_on]=[params[:issue_create_date_end]]
end
end
# if(params[:status_id] != nil)
# if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' &&
# params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='' )
# params[:op][:created_on]='><'
# params[:v][:created_on]=[params[:issue_create_date_start],params[:issue_create_date_end]]
# elsif(params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='')
# params[:op][:created_on]='>='
# params[:v][:created_on]=[params[:issue_create_date_start]]
# elsif(params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='')
# params[:op][:created_on]='<='
# params[:v][:created_on]=[params[:issue_create_date_end]]
# end
# end
@query.build_from_params(params)
#session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names}
# else