diff options
author | James Lopez <james@jameslopez.es> | 2017-07-07 18:31:50 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-07-07 18:31:50 +0200 |
commit | cda7cbde03ca5908144df2d37f32e4142de73174 (patch) | |
tree | 1b1f732fb16d7fae48da9d62e4d4ab5a4459310b /app/finders/issuable_finder.rb | |
parent | 5e66c6568ba2a528e037eaf9d466cfb489b52891 (diff) | |
download | gitlab-ce-cda7cbde03ca5908144df2d37f32e4142de73174.tar.gz |
refactor created at filter to use model scopes
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 |
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) |