diff --git a/lib/filters/filter_keys.yml b/lib/filters/filter_keys.yml index 598ab84d6..902b5f219 100644 --- a/lib/filters/filter_keys.yml +++ b/lib/filters/filter_keys.yml @@ -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" diff --git a/spec/listeners/automation_rule_listener_old_spec.rb b/spec/listeners/automation_rule_listener_old_spec.rb index 4394a18bd..5103117cd 100644 --- a/spec/listeners/automation_rule_listener_old_spec.rb +++ b/spec/listeners/automation_rule_listener_old_spec.rb @@ -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',