mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
fix: add priority in filter keys [CW-3177] (#9179)
* fix: ConditionValidationService fails on conversation priority * fix: custom attribute clash in spec
This commit is contained in:
@@ -44,6 +44,12 @@ conversations:
|
||||
- "not_equal_to"
|
||||
- "is_present"
|
||||
- "is_not_present"
|
||||
priority:
|
||||
attribute_type: "standard"
|
||||
data_type: "text"
|
||||
filter_operators:
|
||||
- "equal_to"
|
||||
- "not_equal_to"
|
||||
display_id:
|
||||
attribute_type: "standard"
|
||||
data_type: "Number"
|
||||
|
||||
@@ -23,7 +23,7 @@ describe AutomationRuleListener do
|
||||
attribute_display_type: 'list',
|
||||
attribute_values: %w[regular platinum gold])
|
||||
create(:custom_attribute_definition,
|
||||
attribute_key: 'priority',
|
||||
attribute_key: 'priority_level',
|
||||
account: account,
|
||||
attribute_model: 'conversation_attribute',
|
||||
attribute_display_type: 'list',
|
||||
@@ -267,7 +267,7 @@ describe AutomationRuleListener do
|
||||
|
||||
context 'when rule matches based on custom_attributes' do
|
||||
before do
|
||||
conversation.update!(custom_attributes: { priority: 'P2' })
|
||||
conversation.update!(custom_attributes: { priority_level: 'P2' })
|
||||
conversation.contact.update!(custom_attributes: { cloud_customer: false })
|
||||
|
||||
automation_rule.update!(
|
||||
@@ -276,7 +276,7 @@ describe AutomationRuleListener do
|
||||
description: 'Add labels, assign team after conversation updated',
|
||||
conditions: [
|
||||
{
|
||||
attribute_key: 'priority',
|
||||
attribute_key: 'priority_level',
|
||||
filter_operator: 'equal_to',
|
||||
values: ['P2'],
|
||||
custom_attribute_type: 'conversation_attribute',
|
||||
|
||||
Reference in New Issue
Block a user