|
|
|
@@ -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!) |
|
|
|
|