summaryrefslogtreecommitdiff
path: root/app/finders/issuable_finder.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-03-06 11:32:27 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-03-06 11:32:27 +0000
commit8975bd3a66d726e6f5ff85d6c55a707d5c7dceb6 (patch)
tree04c6e567b8a533d3b814d5e383013571aaa489b6 /app/finders/issuable_finder.rb
parente4bb25f04bcbd2249da2ef55b1ce6b3df18d42fe (diff)
parentce12b60e97a9a4518dd99b990e20e55ec8da22bc (diff)
downloadgitlab-ce-8975bd3a66d726e6f5ff85d6c55a707d5c7dceb6.tar.gz
[ci skip] Merge branch 'master' into 43770-change-clear-runners-cache-ujs-action-to-an-axios-request
* master: (163 commits) Resolve "Group Leave action is broken on Groups Dashboard and Homepage" So that it's consistent with other entries and EE Fix race condition when previewing docs Resolve "Enable privileged mode for Runner installed on Kubernetes" Change column to file_sha256. Add test. Add changelog Add checksum at runner grape api Revert logic of calculating checksum Add post migration for checksum calculation Add ObjectStorageQueue concern and test Import use_file method from EE and use it for calculation of checksum Change column type to binary from string Add checksum to ci_job_artifacts Make oauth provider login generic Don't error out in system hook if user has `nil` datetime columns Use host URL to build JIRA remote link icon CI/CD-only projects FE Resolve "SSH key add text" Changes after review Projects and groups badges API Remove default scope from todos ...
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 9dd6634b38f..b2d4f9938ff 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -19,6 +19,10 @@
# non_archived: boolean
# iids: integer[]
# my_reaction_emoji: string
+# created_after: datetime
+# created_before: datetime
+# updated_after: datetime
+# updated_before: datetime
#
class IssuableFinder
prepend FinderWithCrossProjectAccess
@@ -79,6 +83,7 @@ class IssuableFinder
def filter_items(items)
items = by_scope(items)
items = by_created_at(items)
+ items = by_updated_at(items)
items = by_state(items)
items = by_group(items)
items = by_search(items)
@@ -283,6 +288,13 @@ class IssuableFinder
end
end
+ def by_updated_at(items)
+ items = items.updated_after(params[:updated_after]) if params[:updated_after].present?
+ items = items.updated_before(params[:updated_before]) if params[:updated_before].present?
+
+ items
+ end
+
def by_state(items)
case params[:state].to_s
when 'closed'