From a2092efc0a4991a4596c65d3d00affea3bd581de Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Wed, 13 Nov 2024 14:27:23 -0600 Subject: [PATCH] Add assigners to filter summary --- app/models/filter/summarized.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/filter/summarized.rb b/app/models/filter/summarized.rb index c6c23adfd..2d406dceb 100644 --- a/app/models/filter/summarized.rb +++ b/app/models/filter/summarized.rb @@ -1,6 +1,6 @@ module Filter::Summarized def summary - [ index_summary, tag_summary, assignee_summary, terms_summary ].compact.to_sentence + " #{bucket_summary}" + [ index_summary, tag_summary, assignee_summary, assigner_summary, terms_summary ].compact.to_sentence + " #{bucket_summary}" end def plain_summary @@ -26,6 +26,12 @@ module Filter::Summarized end end + def assigner_summary + if assigners.any? + "assigned by #{assigners.pluck(:name).to_choice_sentence}" + end + end + def bucket_summary if buckets.any? "in #{buckets.pluck(:name).to_choice_sentence}"