diff options
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r-- | app/models/concerns/issuable.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 9a513ea0e5b..a9a00ab1c44 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -19,6 +19,7 @@ module Issuable include Awardable include Taskable include Importable + include Transitionable include Editable include AfterCommitQueue include Sortable @@ -33,7 +34,7 @@ module Issuable TITLE_HTML_LENGTH_MAX = 800 DESCRIPTION_LENGTH_MAX = 1.megabyte DESCRIPTION_HTML_LENGTH_MAX = 5.megabytes - SEARCHABLE_FIELDS = %w(title description).freeze + SEARCHABLE_FIELDS = %w[title description].freeze MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS = 200 STATE_ID_MAP = { @@ -225,6 +226,10 @@ module Issuable false end + def supports_lock_on_merge? + false + end + def severity return IssuableSeverity::DEFAULT unless supports_severity? @@ -235,6 +240,10 @@ module Issuable super + [:notes] end + def importing_or_transitioning? + importing? || transitioning? + end + private def validate_description_length? @@ -408,14 +417,14 @@ module Issuable sort = sort.to_s grouping_columns = [arel_table[:id]] - if %w(milestone_due_desc milestone_due_asc milestone).include?(sort) + if %w[milestone_due_desc milestone_due_asc milestone].include?(sort) milestone_table = Milestone.arel_table grouping_columns << milestone_table[:id] grouping_columns << milestone_table[:due_date] - elsif %w(merged_at_desc merged_at_asc merged_at).include?(sort) + elsif %w[merged_at_desc merged_at_asc merged_at].include?(sort) grouping_columns << MergeRequest::Metrics.arel_table[:id] grouping_columns << MergeRequest::Metrics.arel_table[:merged_at] - elsif %w(closed_at_desc closed_at_asc closed_at).include?(sort) + elsif %w[closed_at_desc closed_at_asc closed_at].include?(sort) grouping_columns << MergeRequest::Metrics.arel_table[:id] grouping_columns << MergeRequest::Metrics.arel_table[:latest_closed_at] end |