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
|