Fix: Filter with label name (#3418)

This commit is contained in:
Tejaswini Chile 2021-11-19 13:55:40 +05:30 committed by GitHub
parent 24e6a92297
commit 7b44bf5b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ class Conversations::FilterService < FilterService
" conversations.additional_attributes ->> '#{attribute_key}' #{filter_operator_value} #{query_operator} "
when 'standard'
if attribute_key == 'labels'
" tags.id #{filter_operator_value} #{query_operator} "
" tags.name #{filter_operator_value} #{query_operator} "
else
" conversations.#{attribute_key} #{filter_operator_value} #{query_operator} "
end

View file

@ -74,7 +74,7 @@ describe ::Conversations::FilterService do
{
attribute_key: 'labels',
filter_operator: 'equal_to',
values: [1],
values: ['support'],
query_operator: nil
}.with_indifferent_access
]