|
|
|
@@ -64,7 +64,6 @@ class Api::Pm::Issues::UpdateService < ApplicationService |
|
|
|
build_assigner_issue_journal_details unless assigner_ids.nil?# 操作记录 |
|
|
|
build_attachment_issue_journal_details unless attachment_ids.nil? |
|
|
|
build_issue_tag_issue_journal_details unless issue_tag_ids.nil? |
|
|
|
build_issue_project_trends if status_id.present? # 开关时间记录 |
|
|
|
build_assigner_participants unless assigner_ids.nil? # 负责人 |
|
|
|
build_edit_participants |
|
|
|
build_atme_participants if @atme_receivers.present? |
|
|
|
@@ -92,6 +91,7 @@ class Api::Pm::Issues::UpdateService < ApplicationService |
|
|
|
|
|
|
|
build_after_issue_journal_details if @updated_issue.previous_changes.present? # 操作记录 |
|
|
|
build_previous_issue_changes |
|
|
|
build_issue_project_trends if status_id.present? # 开关时间记录 |
|
|
|
build_cirle_blockchain_token if blockchain_token_num.present? |
|
|
|
unless @project.id.zero? |
|
|
|
# @信息发送 |
|
|
|
@@ -172,7 +172,7 @@ class Api::Pm::Issues::UpdateService < ApplicationService |
|
|
|
|
|
|
|
def build_issue_project_trends |
|
|
|
if @updated_issue.previous_changes["status_id"].present? && @updated_issue.previous_changes["status_id"][1] == 5 |
|
|
|
@updated_issue.project_trends.new({user_id: current_user.id, project_id: @project.id, action_type: ProjectTrend::CLOSE}) |
|
|
|
@updated_issue.project_trends.create!({user_id: current_user.id, project_id: @project.id, action_type: ProjectTrend::CLOSE}) |
|
|
|
end |
|
|
|
if @updated_issue.previous_changes["status_id"].present? && @updated_issue.previous_changes["status_id"][0] == 5 |
|
|
|
@updated_issue.project_trends.where(action_type: ProjectTrend::CLOSE).each(&:destroy!) |
|
|
|
|