From c7df7a8a0b1959c3355bab9dd90488904ffe1ae1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 20 Dec 2012 14:49:15 +0100 Subject: [PATCH] Fix migration of the "Prior to last x days" condition in measure filters --- .../WEB-INF/db/migrate/360_move_existing_measure_filters.rb | 4 ++-- 1 file 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)}" -- 2.39.5