Class: Issues::ReorderService

Inherits:
BaseService show all
Defined in:
app/services/issues/reorder_service.rb

Constant Summary

Constants inherited from BaseService

BaseService::NO_REBALANCING_NEEDED

Constants included from Gitlab::Utils::UsageData

Gitlab::Utils::UsageData::FALLBACK

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#close_service, #hook_data, #rebalance_if_needed, #reopen_service

Methods included from IncidentManagement::UsageData

#track_event, #track_incident_action

Methods included from Gitlab::Utils::UsageData

#alt_usage_data, #count, #distinct_count, #measure_duration, #redis_usage_data, #track_usage_event, #with_finished_at, #with_prometheus_client

Methods inherited from BaseService

#initialize

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?

Instance Method Details

#execute(issue) ⇒ Object


5
6
7
8
9
10
11
12
13
# File 'app/services/issues/reorder_service.rb', line 5

def execute(issue)
  return false unless can?(current_user, :update_issue, issue)
  return false if group && !can?(current_user, :read_group, group)

  attrs = issue_params(group)
  return false if attrs.empty?

  update(issue, attrs)
end