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
129
129
def delete_tasks
130
130
assert_privileges ( "miq_task_delete" )
131
131
132
- checked_items = find_checked_items
133
132
new_checked_items = find_checked_items . select { |item | params [ "select-row-#{ item } " ] == "on" }
134
133
135
134
delete_tasks_from_table ( new_checked_items , "Delete selected tasks" )
@@ -333,12 +332,6 @@ def build_query_for_state(opts)
333
332
def tasks_scopes ( opts , use_times = true )
334
333
scope = [ ]
335
334
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
-
342
335
# Specify user scope
343
336
if @tabform == "tasks_1"
344
337
scope << [ :with_userid , session [ :userid ] ]
@@ -357,6 +350,12 @@ def tasks_scopes(opts, use_times = true)
357
350
scope << :no_status_selected
358
351
end
359
352
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
+
360
359
# Add zone scope
361
360
scope << [ :with_zone , opts [ :zone ] ] if opts [ :zone ] && opts [ :zone ] != "<all>"
362
361
You can’t perform that action at this time.
0 commit comments