Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-07-07 19:31:50 +0300
committerJames Lopez <james@jameslopez.es>2017-07-07 19:31:50 +0300
commitcda7cbde03ca5908144df2d37f32e4142de73174 (patch)
tree1b1f732fb16d7fae48da9d62e4d4ab5a4459310b /app/finders/issuable_finder.rb
parent5e66c6568ba2a528e037eaf9d466cfb489b52891 (diff)
refactor created at filter to use model scopes
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 39427d83669..6e37c10166d 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -19,7 +19,7 @@
# iids: integer[]
#
class IssuableFinder
- include Gitlab::Database::CreatedAtFilter
+ include CreatedAtFilter
NONE = '0'.freeze
IRRELEVANT_PARAMS_FOR_CACHE_KEY = %i[utf8 sort page].freeze
@@ -34,6 +34,7 @@ class IssuableFinder
def execute
items = init_collection
items = by_scope(items)
+ items = by_created_at(items)
items = by_state(items)
items = by_group(items)
items = by_search(items)
@@ -44,7 +45,6 @@ class IssuableFinder
items = by_iids(items)
items = by_milestone(items)
items = by_label(items)
- items = by_created_at(items)
# Filtering by project HAS TO be the last because we use the project IDs yielded by the issuable query thus far
items = by_project(items)