Class: Issues::ReopenService
- Inherits:
-
BaseService
- Object
- BaseContainerService
- IssuableBaseService
- BaseService
- Issues::ReopenService
- Defined in:
- app/services/issues/reopen_service.rb
Constant Summary
Constants inherited from BaseService
BaseService::NO_REBALANCING_NEEDED
Constants included from Gitlab::Utils::UsageData
Gitlab::Utils::UsageData::DISTRIBUTED_HLL_FALLBACK, Gitlab::Utils::UsageData::FALLBACK, Gitlab::Utils::UsageData::HISTOGRAM_FALLBACK, Gitlab::Utils::UsageData::MAX_BUCKET_SIZE
Instance Attribute Summary
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
#close_service, #hook_data, #rebalance_if_needed, #reopen_service
Methods included from Gitlab::Utils::Override
#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!
Methods included from IssueTypeHelpers
Methods included from IncidentManagement::UsageData
Methods included from Gitlab::Utils::UsageData
#add, #add_metric, #alt_usage_data, #average, #count, #distinct_count, #estimate_batch_distinct_count, #histogram, #maximum_id, #measure_duration, #minimum_id, #redis_usage_data, #sum, #track_usage_event, #with_finished_at, #with_metadata, #with_prometheus_client
Methods inherited from BaseContainerService
#group_container?, #initialize, #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
Instance Method Details
#execute(issue, skip_authorization: false) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/services/issues/reopen_service.rb', line 5 def execute(issue, skip_authorization: false) return issue unless can_reopen?(issue, skip_authorization: ) if issue.reopen event_service.reopen_issue(issue, current_user) if current_user.project_bot? log_audit_event(issue, current_user, "#{issue.issue_type}_reopened_by_project_bot", "Reopened #{issue.issue_type.humanize(capitalize: false)} #{issue.title}") end create_note(issue, 'reopened') notification_service.async.reopen_issue(issue, current_user) perform_incident_management_actions(issue) execute_hooks(issue, 'reopen') invalidate_cache_counts(issue, users: issue.assignees) issue.update_project_counter_caches Milestones::ClosedIssuesCountService.new(issue.milestone).delete_cache if issue.milestone track_incident_action(current_user, issue, :incident_reopened) end issue end |