Class: ProjectLabel

Inherits:
Label show all
Defined in:
app/models/project_label.rb

Constant Summary collapse

MAX_NUMBER_OF_PRIORITIES =
1

Constants inherited from Label

Label::DEFAULT_COLOR

Constants included from Gitlab::SQL::Pattern

Gitlab::SQL::Pattern::MIN_CHARS_FOR_PARTIAL_MATCHING, Gitlab::SQL::Pattern::REGEX_QUOTED_WORD

Constants included from CacheMarkdownField

CacheMarkdownField::INVALIDATED_BY

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Attribute Summary

Attributes included from CacheMarkdownField

#skip_markdown_cache_validation

Instance Method Summary collapse

Methods inherited from Label

#as_json, #closed_issues_count, #color, #description=, #hook_attrs, ids_on_board, left_join_priorities, link_reference_pattern, min_chars_for_partial_matching, on_project_board?, #open_issues_count, #open_merge_requests_count, optionally_subscribed_by, #present, #prioritize!, prioritized, #priority, #priority?, reference_pattern, reference_prefix, search, #text_color, #title=, #unprioritize!, unprioritized

Methods included from Presentable

#present

Methods included from Subscribable

#lazy_subscription, #set_subscription, #subscribe, #subscribed?, #subscribed_without_subscriptions?, #subscribers, #toggle_subscription, #unsubscribe

Methods included from Referable

#referable_inspect, #reference_link_text, #to_reference_base

Methods included from CacheMarkdownField

#attribute_invalidated?, #banzai_render_context, #cached_html_for, #cached_html_up_to_date?, #can_cache_field?, #invalidated_markdown_cache?, #latest_cached_markdown_version, #local_version, #mentionable_attributes_changed?, #mentioned_filtered_user_ids_for, #parent_user, #refresh_markdown_cache, #refresh_markdown_cache!, #rendered_field_content, #skip_project_check?, #store_mentions!, #updated_cached_html_for

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#subject_foreign_keyObject


17
18
19
# File 'app/models/project_label.rb', line 17

def subject_foreign_key
  'project_id'
end

#to_reference(target_project = nil, format: :id, full: false) ⇒ Object


21
22
23
# File 'app/models/project_label.rb', line 21

def to_reference(target_project = nil, format: :id, full: false)
  super(project, target_project: target_project, format: format, full: full)
end