def self.up
hours_in_day_prop = Property.find_by_prop_key('sonar.technicalDebt.hoursInDay')
- hours_in_day = hours_in_day_prop ? hours_in_day_prop : 8
+ hours_in_day = hours_in_day_prop && hours_in_day_prop.text_value ? hours_in_day_prop.text_value.to_i : 8
work_units_by_size_point = Property.find_by_prop_key('workUnitsBySizePoint')
if work_units_by_size_point && work_units_by_size_point.text_value && work_units_by_size_point.text_value.to_f
work_units_by_size_point.text_value = convert_days_to_minutes(work_units_by_size_point.text_value.to_f, hours_in_day)
def self.up
hours_in_day_prop = Property.find_by_prop_key('sonar.technicalDebt.hoursInDay')
- hours_in_day = hours_in_day_prop ? hours_in_day_prop : 8
+ hours_in_day = hours_in_day_prop && hours_in_day_prop.text_value ? hours_in_day_prop.text_value.to_i : 8
metrics = Metric.find(:all, :conditions => ['name in (?)', ['sqale_index', 'new_technical_debt',
'sqale_effort_to_grade_a', 'sqale_effort_to_grade_b', 'sqale_effort_to_grade_c', 'sqale_effort_to_grade_d',
def self.up
hours_in_day_prop = Property.find_by_prop_key('sonar.technicalDebt.hoursInDay')
- hours_in_day = hours_in_day_prop ? hours_in_day_prop : 8
+ hours_in_day = hours_in_day_prop && hours_in_day_prop.text_value ? hours_in_day_prop.text_value.to_i : 8
filters = MeasureFilter.all(:conditions => "data LIKE '%_metric=sqale_index%' OR data LIKE '%_metric=new_technical_debt%'" +
" OR data LIKE '%_metric=sqale_effort_to_grade_a%' OR data LIKE '%_metric=sqale_effort_to_grade_b%' OR data LIKE '%_metric=sqale_effort_to_grade_c%' " +