修复编号:45283 易修标题过长导致排版问题 去掉多余的属性

This commit is contained in:
guotao 2021-05-07 16:26:56 +08:00
parent 1021731d2b
commit c96dacbf88
3 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ class IssuesController < ApplicationController
def create
issue_params = issue_send_params(params)
Issues::CreateForm.new(issue_params).validate!
Issues::CreateForm.new({subject:issue_params[:subject]}).validate!
@issue = Issue.new(issue_params)
if @issue.save!
if params[:attachment_ids].present?
@ -194,7 +194,7 @@ class IssuesController < ApplicationController
normal_status(-1, "不允许修改为关闭状态")
else
issue_params = issue_send_params(params).except(:issue_classify, :author_id, :project_id)
Issues::UpdateForm.new(issue_params).validate!
Issues::UpdateForm.new({subject:issue_params[:subject]}).validate!
if @issue.update_attributes(issue_params)
if params[:status_id].to_i == 5 #任务由非关闭状态到关闭状态时
@issue.issue_times.update_all(end_time: Time.now)

View File

@ -1,7 +1,7 @@
class Issues::CreateForm
include ActiveModel::Model
attr_accessor :subject,:description,:is_private,:assigned_to_id,:tracker_id,:status_id,:priority_id,:fixed_version_id,:start_date,:due_date,:estimated_hours,:done_ratio,:issue_type,:token,:issue_tags_value,:closed_on,:branch_name,:issue_classify,:author_id,:project_id
attr_accessor :subject
validates :subject, presence: { message: "不能为空" }

View File

@ -1,7 +1,7 @@
class Issues::UpdateForm
include ActiveModel::Model
attr_accessor :subject,:description,:is_private,:assigned_to_id,:tracker_id,:status_id,:priority_id,:fixed_version_id,:start_date,:due_date,:estimated_hours,:done_ratio,:issue_type,:token,:issue_tags_value,:closed_on,:branch_name,:issue_classify,:author_id,:project_id
attr_accessor :subject
validates :subject, presence: { message: "不能为空" }