diff options
author | Rémy Coutable <remy@rymai.me> | 2019-01-17 20:49:07 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-21 11:40:49 +0300 |
commit | f0a2c4116c862fdfa26015aa1a964714d41855e5 (patch) | |
tree | db14699d5e22b49dcc49792cb637cd65003b57a7 /app/finders | |
parent | deca66884ac3bd77e4adbf50213dc6835285350d (diff) |
Allow IssuableFinder to filter by closed_at
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 23af2e0521c..5870f158690 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -94,6 +94,7 @@ class IssuableFinder items = by_scope(items) items = by_created_at(items) items = by_updated_at(items) + items = by_closed_at(items) items = by_state(items) items = by_group(items) items = by_assignee(items) @@ -353,6 +354,13 @@ class IssuableFinder items end + def by_closed_at(items) + items = items.closed_after(params[:closed_after]) if params[:closed_after].present? + items = items.closed_before(params[:closed_before]) if params[:closed_before].present? + + items + end + # rubocop: disable CodeReuse/ActiveRecord def by_state(items) case params[:state].to_s |