Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7e7efbec
Commit
7e7efbec
authored
Mar 16, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Issue#order_created_at_desc from EE to CE
parent
ad9e7c76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
app/models/issue.rb
app/models/issue.rb
+1
-0
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+0
-1
No files found.
app/models/issue.rb
View file @
7e7efbec
...
...
@@ -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
}]
)
}
...
...
ee/app/models/ee/issue.rb
View file @
7e7efbec
...
...
@@ -19,7 +19,6 @@ module EE
scope
:order_weight_desc
,
->
{
reorder
::
Gitlab
::
Database
.
nulls_last_order
(
'weight'
,
'DESC'
)
}
scope
:order_weight_asc
,
->
{
reorder
::
Gitlab
::
Database
.
nulls_last_order
(
'weight'
)
}
scope
:order_created_at_desc
,
->
{
reorder
(
created_at: :desc
)
}
scope
:service_desk
,
->
{
where
(
author:
::
User
.
support_bot
)
}
scope
:no_epic
,
->
{
left_outer_joins
(
:epic_issue
).
where
(
epic_issues:
{
epic_id:
nil
})
}
scope
:in_epics
,
->
(
epics
)
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment