2018-07-16 12:31:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-11-25 10:04:45 -05:00
|
|
|
module Issuable
|
|
|
|
class DestroyService < IssuableBaseService
|
|
|
|
def execute(issuable)
|
2017-12-08 07:17:22 -05:00
|
|
|
TodoService.new.destroy_target(issuable) do |issuable|
|
|
|
|
if issuable.destroy
|
|
|
|
issuable.update_project_counter_caches
|
2018-03-23 01:09:26 -04:00
|
|
|
issuable.assignees.each(&:invalidate_cache_counts)
|
2017-12-08 07:17:22 -05:00
|
|
|
end
|
2017-11-25 10:04:45 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|