Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
4ab6558a5c
|
@ -255,7 +255,7 @@ module QueriesHelper
|
||||||
# Give it a name, required to be valid
|
# Give it a name, required to be valid
|
||||||
@query = IssueQuery.new(:name => "_")
|
@query = IssueQuery.new(:name => "_")
|
||||||
@query.project = @project
|
@query.project = @project
|
||||||
params[:f] = %w(subject status_id priority_id author_id assigned_to_id) unless params[:status_id].nil?
|
params[:f] = %w(subject status_id priority_id author_id assigned_to_id created_on) unless params[:status_id].nil?
|
||||||
params[:op] = {'subject' => "~" ,
|
params[:op] = {'subject' => "~" ,
|
||||||
'status_id' => ( params[:status_id] == '0' ? "!":"=" ),
|
'status_id' => ( params[:status_id] == '0' ? "!":"=" ),
|
||||||
'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ),
|
'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ),
|
||||||
|
@ -266,19 +266,22 @@ module QueriesHelper
|
||||||
'priority_id' => [params[:priority_id]],
|
'priority_id' => [params[:priority_id]],
|
||||||
'author_id' => [params[:author_id]],
|
'author_id' => [params[:author_id]],
|
||||||
'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil?
|
'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil?
|
||||||
# if(params[:status_id] != nil)
|
if(params[:status_id] != nil)
|
||||||
# if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' &&
|
if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' &&
|
||||||
# params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='' )
|
params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='' )
|
||||||
# params[:op][:created_on]='><'
|
params[:op][:created_on]='><'
|
||||||
# params[:v][:created_on]=[params[:issue_create_date_start],params[:issue_create_date_end]]
|
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]!='')
|
elsif(params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='')
|
||||||
# params[:op][:created_on]='>='
|
params[:op][:created_on]='>='
|
||||||
# params[:v][:created_on]=[params[:issue_create_date_start]]
|
params[:v][:created_on]=[params[:issue_create_date_start]]
|
||||||
# elsif(params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='')
|
elsif(params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='')
|
||||||
# params[:op][:created_on]='<='
|
params[:op][:created_on]='<='
|
||||||
# params[:v][:created_on]=[params[:issue_create_date_end]]
|
params[:v][:created_on]=[params[:issue_create_date_end]]
|
||||||
# end
|
else
|
||||||
# end
|
params[:op][:created_on]='!'
|
||||||
|
params[:v][:created_on]=''
|
||||||
|
end
|
||||||
|
end
|
||||||
@query.build_from_params(params)
|
@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}
|
#session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names}
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -79,20 +79,25 @@
|
||||||
user_ischeck=true;
|
user_ischeck=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(user_ischeck==false){
|
|
||||||
nh_show_err_message('请选择用户!');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var role_ischeck=false;
|
var role_ischeck=false;
|
||||||
$("input[name='membership[role_ids][]']").each(function(){
|
$("input[name='membership[role_ids][]']").each(function(){
|
||||||
if($(this).prop('checked')){
|
if($(this).prop('checked')){
|
||||||
role_ischeck=true;
|
role_ischeck=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(user_ischeck==false && role_ischeck==false){
|
||||||
|
nh_show_err_message('请选择用户和角色!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(user_ischeck==false){
|
||||||
|
nh_show_err_message('请选择用户!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(role_ischeck==false){
|
if(role_ischeck==false){
|
||||||
nh_show_err_message('请选择角色!');
|
nh_show_err_message('请选择角色!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue