diff options
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index a1417db3410..ed65b367b8a 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -132,7 +132,7 @@ class Event < ApplicationRecord where( 'action IN (?) OR (target_type IN (?) AND action IN (?))', [actions[:pushed], actions[:commented]], - %w(MergeRequest Issue), [actions[:created], actions[:closed], actions[:merged]] + %w(MergeRequest Issue WorkItem), [actions[:created], actions[:closed], actions[:merged]] ) end @@ -380,13 +380,11 @@ class Event < ApplicationRecord protected def capability - @capability ||= begin - capabilities.flat_map do |ability, syms| - if syms.any? { |sym| send(sym) } # rubocop: disable GitlabSecurity/PublicSend - [ability] - else - [] - end + @capability ||= capabilities.flat_map do |ability, syms| + if syms.any? { |sym| send(sym) } # rubocop: disable GitlabSecurity/PublicSend + [ability] + else + [] end end end |