Commit 549821a5 authored by Brett Walker's avatar Brett Walker Committed by Fatih Acet

Add back call to execute_hooks

parent ec66cf0a
...@@ -270,6 +270,8 @@ module Issuable ...@@ -270,6 +270,8 @@ module Issuable
def to_hook_data(user, old_associations: {}) def to_hook_data(user, old_associations: {})
changes = previous_changes changes = previous_changes
if old_associations
old_labels = old_associations.fetch(:labels, []) old_labels = old_associations.fetch(:labels, [])
old_assignees = old_associations.fetch(:assignees, []) old_assignees = old_associations.fetch(:assignees, [])
...@@ -292,6 +294,7 @@ module Issuable ...@@ -292,6 +294,7 @@ module Issuable
changes[:total_time_spent] = [old_total_time_spent, total_time_spent] changes[:total_time_spent] = [old_total_time_spent, total_time_spent]
end end
end end
end
Gitlab::HookData::IssuableBuilder.new(self).build(user: user, changes: changes) Gitlab::HookData::IssuableBuilder.new(self).build(user: user, changes: changes)
end end
......
...@@ -237,7 +237,6 @@ class IssuableBaseService < BaseService ...@@ -237,7 +237,6 @@ class IssuableBaseService < BaseService
def update_task(issuable) def update_task(issuable)
filter_params(issuable) filter_params(issuable)
# old_associations = associations_before_update(issuable)
if issuable.changed? || params.present? if issuable.changed? || params.present?
issuable.assign_attributes(params.merge(updated_by: current_user)) issuable.assign_attributes(params.merge(updated_by: current_user))
...@@ -252,12 +251,9 @@ class IssuableBaseService < BaseService ...@@ -252,12 +251,9 @@ class IssuableBaseService < BaseService
end end
handle_task_changes(issuable) handle_task_changes(issuable)
invalidate_cache_counts(issuable, users: issuable.assignees.to_a) invalidate_cache_counts(issuable, users: issuable.assignees.to_a)
after_update(issuable) after_update(issuable)
execute_hooks(issuable, 'update', old_associations: nil)
# execute_hooks(issuable, 'update', old_associations: old_associations)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment