File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class ChartsBurndown2Controller < ChartsController
5
5
protected
6
6
7
7
def get_data
8
- @conditions [ :fixed_version_ids ] ||= get_current_fixed_version_in ( @project . id )
8
+ @conditions [ :fixed_version_ids ] ||= get_current_fixed_version_in ( @project )
9
9
10
10
version = unless @conditions [ :fixed_version_ids ] . empty?
11
11
Version . first ( :conditions => { :id => @conditions [ :fixed_version_ids ] [ 0 ] } )
@@ -183,15 +183,15 @@ def get_multiconditions_options
183
183
184
184
private
185
185
186
- def get_current_fixed_version_in ( project_id )
187
- version = Version . all ( :conditions => { :project_id => project_id } ) . detect do |version |
186
+ def get_current_fixed_version_in ( project )
187
+ version = Version . all ( :conditions => { :project_id => project . id } ) . detect do |version |
188
188
version . created_on . to_date <= Date . current && !version . effective_date . nil? && version . effective_date >= Date . current
189
189
end
190
190
if version
191
191
[ version . id ]
192
192
else
193
- versions = RedmineCharts ::ConditionsUtils . to_options ( [ :fixed_version_ids ] ) [ :fixed_version_ids ]
194
- unless versions . empty?
193
+ versions = RedmineCharts ::ConditionsUtils . to_options ( project , [ :fixed_version_ids ] ) [ :fixed_version_ids ]
194
+ unless versions . nil? || versions . empty?
195
195
[ versions . first [ 1 ] ]
196
196
else
197
197
[ ]
You can’t perform that action at this time.
0 commit comments