diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-04 18:52:01 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-04 20:00:33 +0300 |
commit | 0f2a9681a318e5d27ef4e45195f2ac4b75f351dc (patch) | |
tree | e49d1af5cc144b272d07fba27cd1dafe84ab50d1 | |
parent | 4b1d580a84016397bc1dfd0d089b8ed7ace9228d (diff) |
[Multiple issue assignees] Resolving conflicts
-rw-r--r-- | app/models/issue_assignee.rb | 16 | ||||
-rw-r--r-- | app/models/user.rb | 1 | ||||
-rw-r--r-- | app/services/notification_service.rb | 4 |
3 files changed, 3 insertions, 18 deletions
diff --git a/app/models/issue_assignee.rb b/app/models/issue_assignee.rb index b94b55bb1d1..0663d3aaef8 100644 --- a/app/models/issue_assignee.rb +++ b/app/models/issue_assignee.rb @@ -7,23 +7,7 @@ class IssueAssignee < ActiveRecord::Base after_create :update_assignee_cache_counts after_destroy :update_assignee_cache_counts - # EE-specific - after_create :update_elasticsearch_index - after_destroy :update_elasticsearch_index - # EE-specific - def update_assignee_cache_counts assignee&.update_cache_counts end - - def update_elasticsearch_index - if current_application_settings.elasticsearch_indexing? - ElasticIndexerWorker.perform_async( - :update, - 'Issue', - issue.id, - changed_fields: ['assignee_ids'] - ) - end - end end diff --git a/app/models/user.rb b/app/models/user.rb index a3126cbb644..6015643b565 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -89,7 +89,6 @@ class User < ActiveRecord::Base has_many :subscriptions, dependent: :destroy has_many :recent_events, -> { order "id DESC" }, foreign_key: :author_id, class_name: "Event" has_many :oauth_applications, class_name: 'Doorkeeper::Application', as: :owner, dependent: :destroy - has_one :abuse_report, dependent: :destroy, foreign_key: :user_id has_many :reported_abuse_reports, dependent: :destroy, foreign_key: :reporter_id, class_name: "AbuseReport" has_many :spam_logs, dependent: :destroy diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index fe9f5ae2b33..c65c66d7150 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -74,12 +74,14 @@ class NotificationService previous_assignee: previous_assignees ) + previous_assignee_ids = previous_assignees.map(&:id) + recipients.each do |recipient| mailer.send( :reassigned_issue_email, recipient.id, issue.id, - previous_assignees.map(&:id), + previous_assignee_ids, current_user.id ).deliver_later end |