Module: Timebox
Defined Under Namespace
Classes: TimeboxStruct
Constant Summary
collapse
- None =
Represents a “No Timebox” state used for filtering Issues and Merge Requests that have no timeboxes assigned.
TimeboxStruct.new('No Timebox', 'No Timebox', 0)
- Any =
TimeboxStruct.new('Any Timebox', '', -1)
- Upcoming =
TimeboxStruct.new('Upcoming', '#upcoming', -2)
- Started =
TimeboxStruct.new('Started', '#started', -3)
Gitlab::SQL::Pattern::MIN_CHARS_FOR_PARTIAL_MATCHING, Gitlab::SQL::Pattern::REGEX_QUOTED_TERM
CacheMarkdownField::INVALIDATED_BY
Instance Attribute Summary
#skip_markdown_cache_validation
Instance Method Summary
collapse
#strip_attributes!
Methods included from Referable
#referable_inspect, #to_reference_base
split_query_to_search_terms
#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
Instance Method Details
#merge_requests_enabled? ⇒ Boolean
149
150
151
|
# File 'app/models/concerns/timebox.rb', line 149
def merge_requests_enabled?
raise NotImplementedError
end
|
#reference_link_text(from = nil) ⇒ Object
125
126
127
|
# File 'app/models/concerns/timebox.rb', line 125
def reference_link_text(from = nil)
self.class.reference_prefix + self.title
end
|
#resource_parent ⇒ Object
141
142
143
|
# File 'app/models/concerns/timebox.rb', line 141
def resource_parent
raise NotImplementedError
end
|
#safe_title ⇒ Object
137
138
139
|
# File 'app/models/concerns/timebox.rb', line 137
def safe_title
title.to_slug.normalize.to_s
end
|
#timebox_name ⇒ Object
133
134
135
|
# File 'app/models/concerns/timebox.rb', line 133
def timebox_name
model_name.singular
end
|
#title=(value) ⇒ Object
129
130
131
|
# File 'app/models/concerns/timebox.rb', line 129
def title=(value)
write_attribute(:title, sanitize_title(value)) if value.present?
end
|
#to_ability_name ⇒ Object
145
146
147
|
# File 'app/models/concerns/timebox.rb', line 145
def to_ability_name
model_name.singular
end
|
#to_reference ⇒ Object
121
122
123
|
# File 'app/models/concerns/timebox.rb', line 121
def to_reference
raise NotImplementedError
end
|
#weight_available? ⇒ Boolean
153
154
155
|
# File 'app/models/concerns/timebox.rb', line 153
def weight_available?
resource_parent&.feature_available?(:issue_weights)
end
|