diff options
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r-- | app/services/issuable_base_service.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index e9312bd6b31..3b007d4dba7 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -314,16 +314,19 @@ class IssuableBaseService < ::BaseContainerService before_update(issuable) - # Do not touch when saving the issuable if only changes position within a list. We should call - # this method at this point to capture all possible changes. - should_touch = update_timestamp?(issuable) - - issuable.updated_by = current_user if should_touch # We have to perform this check before saving the issuable as Rails resets # the changed fields upon calling #save. update_project_counters = issuable.project && update_project_counter_caches?(issuable) issuable_saved = issuable.with_transaction_returning_status do + @callbacks.each(&:before_update) + + # Do not touch when saving the issuable if only changes position within a list. We should call + # this method at this point to capture all possible changes. + should_touch = update_timestamp?(issuable) + + issuable.updated_by = current_user if should_touch + transaction_update(issuable, { save_with_touch: should_touch }) end |