|
|
|
@@ -5,7 +5,7 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
|
|
|
|
attr_reader :project, :issue, :current_user |
|
|
|
attr_reader :status_id, :priority_id, :milestone_id, :branch_name, :start_date, :due_date, :subject, :description, :blockchain_token_num |
|
|
|
attr_reader :issue_tag_ids, :assigner_ids, :attachment_ids, :receivers_login, :before_issue_tag_ids, :before_assigner_ids |
|
|
|
attr_reader :issue_tag_ids, :assigner_ids, :attachment_ids, :receivers_login, :before_issue_tag_ids, :before_assigner_ids, :project_id |
|
|
|
attr_accessor :add_assigner_ids, :previous_issue_changes, :updated_issue, :atme_receivers |
|
|
|
|
|
|
|
validates :project, :issue, :current_user, presence: true |
|
|
|
@@ -35,6 +35,7 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
@pm_issue_type = params[:pm_issue_type] |
|
|
|
@root_id = params[:root_id] |
|
|
|
@time_scale = params[:time_scale] |
|
|
|
@project_id = params[:project_id] |
|
|
|
@add_assigner_ids = [] |
|
|
|
@previous_issue_changes = {} |
|
|
|
end |
|
|
|
@@ -80,7 +81,7 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
@updated_issue.root_id = @root_id unless @root_id.nil? #不为 nil的时候更新 |
|
|
|
@updated_issue.root_id = nil if @root_id.try(:zero?) #为 0 的时候设置为 nil |
|
|
|
@updated_issue.time_scale = @time_scale unless @time_scale.nil? |
|
|
|
|
|
|
|
@updated_issue.project_id = @project_id unless @project_id.nil? |
|
|
|
@updated_issue.updated_on = Time.now |
|
|
|
@updated_issue.changer_id = @current_user.id |
|
|
|
@updated_issue.save! |
|
|
|
|