app/models/foreman_tasks/task.rb in foreman-tasks-1.0.1 vs app/models/foreman_tasks/task.rb in foreman-tasks-1.1.0
- old
+ new
@@ -40,9 +40,13 @@
scoped_search :on => :started_at, :complete_value => false
scoped_search :on => :state_updated_at, :complete_value => false
scoped_search :on => :start_at, :complete_value => false
scoped_search :on => :ended_at, :complete_value => false
scoped_search :on => :parent_task_id, :complete_value => true
+ scoped_search :on => :duration, :complete_value => false, :ext_method => :search_by_duration, :operators => %w[> >= = <= <], :only_explicit => true
+
+ # Note: the following searches may return duplicates, this is due to
+ # one task maybe having multiple locks (e.g. read/write) for the same resource_id
scoped_search :relation => :locks, :on => :resource_id, :complete_value => false, :rename => 'location_id', :ext_method => :search_by_taxonomy, :only_explicit => true
scoped_search :relation => :locks, :on => :resource_id, :complete_value => false, :rename => 'organization_id', :ext_method => :search_by_taxonomy, :only_explicit => true
scoped_search :relation => :locks, :on => :resource_type, :complete_value => true, :rename => 'resource_type', :ext_method => :search_by_generic_resource, :only_explicit => true
scoped_search :relation => :locks, :on => :resource_id, :complete_value => false, :rename => 'resource_id', :ext_method => :search_by_generic_resource, :only_explicit => true
scoped_search :on => :user_id,