@snapshots=Snapshot.find(:all, :conditions => [snapshot_conditions, snapshot_values], :include => 'project', :order => 'projects.name')
size_measures=ProjectMeasure.find(:all,
- :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.rule_priority,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status',
+ :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status',
:joins => :snapshot,
- :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@size_metric.id}", snapshot_values],
+ :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@size_metric.id} AND project_measures.rule_id IS NULL AND project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values],
:order => 'project_measures.value')
color_measures=ProjectMeasure.find(:all,
- :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.rule_priority,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status',
+ :select => 'project_measures.id,project_measures.value,project_measures.metric_id,project_measures.snapshot_id,project_measures.rule_id,project_measures.text_value,project_measures.characteristic_id,project_measures.alert_status',
:joins => :snapshot,
- :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@color_metric.id} AND project_measures.rule_id IS NULL AND "+ "project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values],
+ :conditions => [snapshot_conditions + " AND project_measures.metric_id=#{@color_metric.id} AND project_measures.rule_id IS NULL AND project_measures.characteristic_id IS NULL AND project_measures.person_id IS NULL", snapshot_values],
:order => 'project_measures.value')
- @size_measure_by_sid={}, @color_measure_by_sid={}
+ @size_measure_by_sid={}
+ @color_measure_by_sid={}
size_measures.each do |m|
@size_measure_by_sid[m.snapshot_id]=m
end