File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,6 @@ def cancel_task
129129 def delete_tasks
130130 assert_privileges ( "miq_task_delete" )
131131
132- checked_items = find_checked_items
133132 new_checked_items = find_checked_items . select { |item | params [ "select-row-#{ item } " ] == "on" }
134133
135134 delete_tasks_from_table ( new_checked_items , "Delete selected tasks" )
@@ -333,12 +332,6 @@ def build_query_for_state(opts)
333332 def tasks_scopes ( opts , use_times = true )
334333 scope = [ ]
335334
336- # Add time scope
337- if use_times
338- t = format_timezone ( opts [ :time_period ] . to_i != 0 ? opts [ :time_period ] . days . ago : Time . now , Time . zone , "raw" )
339- scope << [ :with_updated_on_between , t . beginning_of_day , t . end_of_day ]
340- end
341-
342335 # Specify user scope
343336 if @tabform == "tasks_1"
344337 scope << [ :with_userid , session [ :userid ] ]
@@ -357,6 +350,12 @@ def tasks_scopes(opts, use_times = true)
357350 scope << :no_status_selected
358351 end
359352
353+ # Add time scope
354+ if use_times
355+ t = format_timezone ( opts [ :time_period ] . to_i != 0 ? opts [ :time_period ] . days . ago : Time . now , Time . zone , "raw" )
356+ scope << [ :with_updated_on_between , t . beginning_of_day , t . end_of_day ]
357+ end
358+
360359 # Add zone scope
361360 scope << [ :with_zone , opts [ :zone ] ] if opts [ :zone ] && opts [ :zone ] != "<all>"
362361
You can’t perform that action at this time.
0 commit comments