Fix display order of recent jobs and pipelines. closes #3148
authorTom Clegg <tom@curoverse.com>
Fri, 1 Aug 2014 01:49:51 +0000 (21:49 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 1 Aug 2014 01:49:51 +0000 (21:49 -0400)
apps/workbench/app/controllers/application_controller.rb

index f6c782d8f62fcb5799de3db01b5f7b5c98bf1e21..df57e9e71fa85396d95ee35ed887b466f7d3fb9d 100644 (file)
@@ -617,8 +617,8 @@ class ApplicationController < ActionController::Base
     (Job.limit(10) |
      PipelineInstance.limit(10)).
       sort_by do |x|
-      x.finished_at || x.started_at || x.created_at rescue x.created_at
-    end
+      (x.finished_at || x.started_at rescue nil) || x.modified_at || x.created_at
+    end.reverse
   end
 
   helper_method :my_project_tree