diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-08-30 10:48:55 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-30 10:48:55 +0300 |
commit | 7187395ef13d8d84a145d1b5251882ebada3f7f2 (patch) | |
tree | 06188448a7059648d5ca99c159f525eaf3499cc3 /app/finders/issuable_finder.rb | |
parent | df8ca5aaab21f47c328cc15f2c454b9cc97a3ed5 (diff) |
Add filter by my reaction
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r-- | app/finders/issuable_finder.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 08a843ada97..7e0d3b5c979 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -18,6 +18,7 @@ # sort: string # non_archived: boolean # iids: integer[] +# my_reaction_emoji: string # class IssuableFinder include CreatedAtFilter @@ -46,6 +47,7 @@ class IssuableFinder items = by_iids(items) items = by_milestone(items) items = by_label(items) + items = by_my_reaction_emoji(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) @@ -371,6 +373,14 @@ class IssuableFinder items end + def by_my_reaction_emoji(items) + if params[:my_reaction_emoji].present? && current_user + items = items.awarded(current_user, params[:my_reaction_emoji]) + end + + items + end + def by_due_date(items) if due_date? if filter_by_no_due_date? |