From: Simon Brandhof Date: Tue, 4 Dec 2012 15:01:37 +0000 (+0100) Subject: Fix migration of measure filters X-Git-Tag: 3.4~171 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c1a59f217a7c8a8ecbfc17a7124b2024ed93e5c;p=sonarqube.git Fix migration of measure filters --- diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/357_move_existing_measure_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/357_move_existing_measure_filters.rb index 3fad50fc152..6b83c961d89 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/357_move_existing_measure_filters.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/357_move_existing_measure_filters.rb @@ -118,9 +118,9 @@ 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.period}" if old.period + data << "c#{metric_criteria_id}_period=#{old_filter.period_index}" if old_filter.period_index metric_criteria_id += 1 - elsif old.family=='direct-children' && op.text_value=='true' + elsif old.family=='direct-children' && old.text_value=='true' data << "onBaseComponents=true" end end