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