aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-12-10 14:40:52 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-12-10 14:40:52 +0100
commitb21329e5860391c8f4b3ac33d878f3af3ad99a6b (patch)
tree528c1a289c6923247f55e054badab0a08757e52c
parentf478e8f0db76bca44e626e6eb9bdf0e002523fb0 (diff)
downloadsonarqube-b21329e5860391c8f4b3ac33d878f3af3ad99a6b.tar.gz
sonarqube-b21329e5860391c8f4b3ac33d878f3af3ad99a6b.zip
Fix migration of filters on periods
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/360_move_existing_measure_filters.rb2
1 files changed, 1 insertions, 1 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 57e4a334e46..85e71a55480 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
@@ -117,7 +117,7 @@ class MoveExistingMeasureFilters < ActiveRecord::Migration
data << "c#{metric_criteria_id}_metric=#{old.kee}"
data << "c#{metric_criteria_id}_op=#{operator_code(old.operator)}"
data << "c#{metric_criteria_id}_val=#{old.value}"
- data << "c#{metric_criteria_id}_period=#{old_filter.period_index}" if old_filter.period_index
+ data << "c#{metric_criteria_id}_period=#{old_filter.period_index}" if old.variation && old_filter.period_index
metric_criteria_id += 1
elsif old.family=='direct-children' && old.text_value=='true'
data << "onBaseComponents=true"