|
|
|
@@ -4,11 +4,12 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
include Api::V1::Issues::Concerns::Loadable |
|
|
|
|
|
|
|
attr_reader :project, :issue, :current_user |
|
|
|
attr_reader :status_id, :priority_id, :milestone_id, :branch_name, :start_date, :due_date, :subject, :description |
|
|
|
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 |
|
|
|
attr_accessor :add_assigner_ids, :previous_issue_changes, :updated_issue, :atme_receivers |
|
|
|
|
|
|
|
validates :project, :issue, :current_user, presence: true |
|
|
|
validates :blockchain_token_num, numericality: {greater_than: 0} |
|
|
|
|
|
|
|
def initialize(project, issue, params, current_user = nil) |
|
|
|
@project = project |
|
|
|
@@ -22,6 +23,7 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
@due_date = params[:due_date] |
|
|
|
@subject = params[:subject] |
|
|
|
@description = params[:description] |
|
|
|
@blockchain_token_num = params[:blockchain_token_num] |
|
|
|
@issue_tag_ids = params[:issue_tag_ids] |
|
|
|
@assigner_ids = params[:assigner_ids] |
|
|
|
@attachment_ids = params[:attachment_ids] |
|
|
|
@@ -94,6 +96,7 @@ class Api::V1::Issues::UpdateService < ApplicationService |
|
|
|
@updated_issue.due_date = due_date unless due_date.nil? |
|
|
|
@updated_issue.subject = subject if subject.present? |
|
|
|
@updated_issue.description = description unless description.nil? |
|
|
|
@updated_issue.blockchain_token_num = blockchain_token_num unless blockchain_token_num.nil? |
|
|
|
end |
|
|
|
|
|
|
|
def build_assigner_participants |
|
|
|
|