summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-09-26 12:59:00 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-09-26 12:59:56 +0200
commit3fb24bc62183f638bad520fed6f8dd168daf6817 (patch)
treebb13712f68568877d794e6b44054bbe0d02856c4
parent39b90bcec48f26a5a8c1eea468ffca7d89097f8b (diff)
downloadgitlab-ce-jobs-sort-by-id.tar.gz
Sort by id, not created_atjobs-sort-by-id
-rw-r--r--app/controllers/projects/jobs_controller.rb2
-rw-r--r--changelogs/unreleased/jobs-sort-by-id.yml5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index 96abdac91b6..1b985ea9763 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -11,7 +11,7 @@ class Projects::JobsController < Projects::ApplicationController
def index
@scope = params[:scope]
@all_builds = project.builds.relevant
- @builds = @all_builds.order('created_at DESC')
+ @builds = @all_builds.order('ci_builds.id DESC')
@builds =
case @scope
when 'pending'
diff --git a/changelogs/unreleased/jobs-sort-by-id.yml b/changelogs/unreleased/jobs-sort-by-id.yml
new file mode 100644
index 00000000000..ec2c3a17b74
--- /dev/null
+++ b/changelogs/unreleased/jobs-sort-by-id.yml
@@ -0,0 +1,5 @@
+---
+title: Sort JobsController by id, not created_at
+merge_request:
+author:
+type: fixed