summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 15:09:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 15:09:45 +0000
commitaaf59610548d9b0fd01acfd50e831cbe519ecba2 (patch)
treeb6505abedcd965ebae5118b504b185b63129dc4c /app/models/issue.rb
parent1363ca12f1f07c634647cf55c4c16b7401098673 (diff)
downloadgitlab-ce-aaf59610548d9b0fd01acfd50e831cbe519ecba2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 145807457a1..3d389013985 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -68,6 +68,7 @@ class Issue < ApplicationRecord
scope :order_closest_future_date, -> { reorder(Arel.sql('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC')) }
scope :order_relative_position_asc, -> { reorder(::Gitlab::Database.nulls_last_order('relative_position', 'ASC')) }
scope :order_closed_date_desc, -> { reorder(closed_at: :desc) }
+ scope :order_created_at_desc, -> { reorder(created_at: :desc) }
scope :preload_associated_models, -> { preload(:labels, project: :namespace) }
scope :with_api_entity_associations, -> { preload(:timelogs, :assignees, :author, :notes, :labels, project: [:route, { namespace: :route }] ) }