diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-26 12:59:00 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-26 12:59:56 +0200 |
commit | 3fb24bc62183f638bad520fed6f8dd168daf6817 (patch) | |
tree | bb13712f68568877d794e6b44054bbe0d02856c4 | |
parent | 39b90bcec48f26a5a8c1eea468ffca7d89097f8b (diff) | |
download | gitlab-ce-jobs-sort-by-id.tar.gz |
Sort by id, not created_atjobs-sort-by-id
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/jobs-sort-by-id.yml | 5 |
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 |