更改:删除工作项需删除子工作项放到回调中

This commit is contained in:
2023-11-20 09:38:52 +08:00
parent b305b22a8a
commit 8030d7db1a
2 changed files with 1 additions and 8 deletions

View File

@@ -82,6 +82,7 @@ class Issue < ApplicationRecord
has_many :assigners, through: :issue_assigners
has_many :issue_participants, dependent: :destroy
has_many :participants, through: :issue_participants
has_many :children_issues, class_name: 'Issue', foreign_key: :root_id, dependent: :destroy
has_many :show_participants, -> {joins(:issue_participants).where.not(issue_participants: {participant_type: 'atme'}).distinct}, through: :issue_participants, source: :participant
has_many :show_assigners, -> {joins(:issue_assigners).distinct}, through: :issue_assigners, source: :assigner
has_many :show_issue_tags, -> {joins(:issue_tags_relates).distinct}, through: :issue_tags_relates, source: :issue_tag