summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-06 18:07:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-06 18:07:44 +0000
commite1867c38fc5a4b931b4b2256d4909182e94f1051 (patch)
tree3047b637f7f9a31e74c62d3fe054b24c95e3534e /app/finders
parent63894d59abd34f76f399d755012cdcd32c5b1103 (diff)
downloadgitlab-ce-e1867c38fc5a4b931b4b2256d4909182e94f1051.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/pipelines_finder.rb8
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])