Class: IssueLinks::CreateService

Inherits:
IssuableLinks::CreateService show all
Includes:
IncidentManagement::UsageData
Defined in:
app/services/issue_links/create_service.rb

Constant Summary

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 IssuableLinks::CreateService

#current_user, #issuable, #params

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from IncidentManagement::UsageData

#track_incident_action

Methods included from Gitlab::Utils::UsageData

#add, #add_metric, #alt_usage_data, #count, #distinct_count, #epics_deepest_relationship_level, #estimate_batch_distinct_count, #histogram, #jira_integration_data, #maximum_id, #measure_duration, #minimum_id, #redis_usage_data, #sum, #track_usage_event, #with_duration, #with_finished_at, #with_prometheus_client

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from IssuableLinks::CreateService

#execute, #initialize, #relate_issuables

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?

Constructor Details

This class inherits a constructor from IssuableLinks::CreateService

Instance Method Details

#linkable_issuables(issues) ⇒ Object


7
8
9
10
11
# File 'app/services/issue_links/create_service.rb', line 7

def linkable_issuables(issues)
  @linkable_issuables ||= begin
    issues.select { |issue| can?(current_user, :admin_issue_link, issue) }
  end
end

13
14
15
# File 'app/services/issue_links/create_service.rb', line 13

def previous_related_issuables
  @related_issues ||= issuable.related_issues(current_user).to_a
end