diff options
Diffstat (limited to 'app/models/customer_relations/issue_contact.rb')
-rw-r--r-- | app/models/customer_relations/issue_contact.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/customer_relations/issue_contact.rb b/app/models/customer_relations/issue_contact.rb index 89dac6bad22..3e9d1e97c8c 100644 --- a/app/models/customer_relations/issue_contact.rb +++ b/app/models/customer_relations/issue_contact.rb @@ -16,6 +16,12 @@ class CustomerRelations::IssueContact < ApplicationRecord .pluck(:contact_id) end + def self.delete_for_project(project_id) + joins(:issue) + .where(issues: { project_id: project_id }) + .delete_all + end + private def contact_belongs_to_issue_group_or_ancestor |