]> source.dussan.org Git - sonarqube.git/commitdiff
Fix migration of the "Prior to last x days" condition in measure filters
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Dec 2012 13:49:15 +0000 (14:49 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Dec 2012 13:49:34 +0000 (14:49 +0100)
sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb

index 606494245f2f105dc849c58dd6d292c92c9748e6..ff28d7ad8ca6831bc5ca4055ee9e53f88cceac66 100644 (file)
@@ -120,8 +120,8 @@ class MoveExistingMeasureFilters < ActiveRecord::Migration
       elsif old.family=='language' && old.text_value.present?
         data << "languages=#{old.text_value}"
       elsif old.family=='date' && old.value && old.operator.present?
-        data << "ageMaxDays=#{old.value}" if old.operator=='<'
-        data << "ageMinDays=#{old.value}" if old.operator=='>'
+        data << "ageMaxDays=#{old.value.to_i}" if old.operator=='<'
+        data << "ageMinDays=#{old.value.to_i}" if old.operator=='>='
       elsif old.family=='metric' && old.kee && old.operator && old.value
         data << "c#{metric_criteria_id}_metric=#{old.kee}"
         data << "c#{metric_criteria_id}_op=#{operator_code(old.operator)}"