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