Class: IncidentManagement::IssuableEscalationStatuses::AfterUpdateService

Inherits:
BaseProjectService show all
Defined in:
app/services/incident_management/issuable_escalation_statuses/after_update_service.rb

Instance Attribute Summary

Attributes inherited from BaseProjectService

#project

Attributes inherited from BaseContainerService

#container, #current_user, #group, #params, #project

Instance Method Summary collapse

Methods inherited from BaseContainerService

#group_container?, #namespace_container?, #project_container?, #project_group

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(issuable, current_user, **params) ⇒ AfterUpdateService

Returns a new instance of AfterUpdateService.



6
7
8
9
10
11
# File 'app/services/incident_management/issuable_escalation_statuses/after_update_service.rb', line 6

def initialize(issuable, current_user, **params)
  @issuable = issuable
  @escalation_status = issuable.escalation_status

  super(project: issuable.project, current_user: current_user, params: params)
end

Instance Method Details

#executeObject



13
14
15
16
17
# File 'app/services/incident_management/issuable_escalation_statuses/after_update_service.rb', line 13

def execute
  after_update

  ServiceResponse.success(payload: { escalation_status: escalation_status })
end