Class: IncidentManagement::IssuableEscalationStatuses::PrepareUpdateService
- Inherits:
-
BaseProjectService
- Object
- BaseContainerService
- BaseProjectService
- IncidentManagement::IssuableEscalationStatuses::PrepareUpdateService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/incident_management/issuable_escalation_statuses/prepare_update_service.rb
Constant Summary collapse
- SUPPORTED_PARAMS =
%i[status].freeze
Instance Attribute Summary
Attributes inherited from BaseProjectService
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params, #project
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(issuable, current_user, params) ⇒ PrepareUpdateService
constructor
A new instance of PrepareUpdateService.
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
Constructor Details
#initialize(issuable, current_user, params) ⇒ PrepareUpdateService
Returns a new instance of PrepareUpdateService.
10 11 12 13 14 15 |
# File 'app/services/incident_management/issuable_escalation_statuses/prepare_update_service.rb', line 10 def initialize(issuable, current_user, params) @issuable = issuable @param_errors = [] super(project: issuable.project, current_user: current_user, params: params) end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/services/incident_management/issuable_escalation_statuses/prepare_update_service.rb', line 17 def execute return availability_error unless available? filter_unsupported_params filter_attributes filter_redundant_params return invalid_param_error if param_errors.any? ServiceResponse.success(payload: { escalation_status: params }) end |