2021-04-29 21:17:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Issues
|
|
|
|
class AfterCreateService < Issues::BaseService
|
2023-04-23 21:23:45 +05:30
|
|
|
# TODO: this is to be removed once we get to rename the IssuableBaseService project param to container
|
|
|
|
def initialize(container:, current_user: nil, params: {})
|
|
|
|
super(project: container, current_user: current_user, params: params)
|
|
|
|
end
|
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
def execute(issue)
|
|
|
|
todo_service.new_issue(issue, current_user)
|
|
|
|
delete_milestone_total_issue_counter_cache(issue.milestone)
|
|
|
|
track_incident_action(current_user, issue, :incident_created)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
Issues::AfterCreateService.prepend_mod
|