aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-12-20 14:49:15 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-12-20 14:49:34 +0100
commitc7df7a8a0b1959c3355bab9dd90488904ffe1ae1 (patch)
tree75fb831aea0dc21f1f98944ff5798136996dba4e
parent72f54a500f4f2dcf7d790d23aac9f837ad34ceae (diff)
downloadsonarqube-c7df7a8a0b1959c3355bab9dd90488904ffe1ae1.tar.gz
sonarqube-c7df7a8a0b1959c3355bab9dd90488904ffe1ae1.zip
Fix migration of the "Prior to last x days" condition in measure filters
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb
index 606494245f2..ff28d7ad8ca 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb
@@ -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)}"