当指派着为空时,导出统计为空

This commit is contained in:
daiao 2016-11-10 11:11:28 +08:00
parent c5ab8550ff
commit 43e72813b4
1 changed files with 5 additions and 0 deletions

View File

@ -235,7 +235,9 @@ class IssuesController < ApplicationController
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
@issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1
@issue.fixed_version_id = nil if @issue.fixed_version_id == 0
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
if @issue.save
#params[:issue][:assigned_to_id] = nil if params[:issue][:assigned_to_id].to_i == 0
senduser = User.find(params[:issue][:assigned_to_id])
issue_id = @issue.id
issue_title = params[:issue][:subject]
@ -282,15 +284,18 @@ class IssuesController < ApplicationController
# 用户编辑更改issue
def update
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
if params[:issue_detail]
issue = Issue.find(params[:id])
issue = update_user_issue_detail(issue, params)
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
@saved = update_user_issue_detail(issue, params)
return
else
# 修改实例变量的值
return unless update_issue_from_params
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
saved = false
begin
@saved = @issue.save_issue_with_child_records(params, @time_entry)