diff options
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/pipelines_finder.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index 092a805f275..5a0d53d9683 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -25,6 +25,7 @@ class PipelinesFinder items = by_name(items) items = by_username(items) items = by_yaml_errors(items) + items = by_updated_at(items) sort_items(items) end @@ -128,6 +129,13 @@ class PipelinesFinder end # rubocop: enable CodeReuse/ActiveRecord + def by_updated_at(items) + items = items.updated_before(params[:updated_before]) if params[:updated_before].present? + items = items.updated_after(params[:updated_after]) if params[:updated_after].present? + + items + end + # rubocop: disable CodeReuse/ActiveRecord def sort_items(items) order_by = if ALLOWED_INDEXED_COLUMNS.include?(params[:order_by]) |