This commit is contained in:
2023-02-24 14:32:21 +08:00
parent 35bb8fbc11
commit b616c971db
8 changed files with 25 additions and 8 deletions

View File

@@ -81,7 +81,7 @@ class Api::V1::Issues::ListService < ApplicationService
issues = issues.opened
end
scope = issues.includes(:priority, :issue_status, :user, :show_assigners, :show_issue_tags, :version, :issue_tags, :comment_journals)
scope = issues.includes(:priority, :issue_status, :user, :show_assigners, :show_issue_tags, :version, :comment_journals)
scope = scope.reorder("#{sort_by} #{sort_direction}").distinct

View File

@@ -57,7 +57,7 @@ class Api::V1::Issues::UpdateService < ApplicationService
build_atme_participants if @atme_receivers.present?
@updated_issue.assigners = @assigners || User.none unless assigner_ids.nil?
@updated_issue.attachments = @attachments || Attachment.none unless attachment_ids.nil?
@updated_issue.issue_tags = @issue_tags || IssueTag.none unless issue_tag_ids.nil?
@updated_issue.issue_tags_relates.destroy_all & @updated_issue.issue_tags = @issue_tags || IssueTag.none unless issue_tag_ids.nil?
@updated_issue.issue_tags_value = @issue_tags.order("id asc").pluck(:id).join(",") unless issue_tag_ids.nil?
@updated_issue.updated_on = Time.now