]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7780 Fix timemachine WS on Oracle
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 13 Jul 2016 15:03:51 +0000 (17:03 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 13 Jul 2016 15:04:40 +0000 (17:04 +0200)
SNAPSHOTS.CREATED_AT was badly cast as string by rails, it's now cast as a number

server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb

index f8feb105a4767319bf3ebcedc3f6435b4a43db27..fe5ba43d3961341543e37d1415b08f0cba72809f 100644 (file)
@@ -104,7 +104,7 @@ class Api::TimemachineController < Api::ApiController
 
         measures.each do |m|
           @analysis_uuids << m.analysis_uuid
-          @dates_by_analysis_uuid[m.analysis_uuid] = date_column.type_cast(m.attributes['created_at'])
+          @dates_by_analysis_uuid[m.analysis_uuid] = date_column.type_cast(m.attributes['created_at']).to_i
           @measures_by_analysis_uuid[m.analysis_uuid] ||= {}
           @measures_by_analysis_uuid[m.analysis_uuid][MetadataId.new(m.metric_id)] = m
         end