From 7bd830ebfe1b14ca8ce45b29e58878c6e6691d78 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Thu, 30 Mar 2023 22:34:18 +0530 Subject: [PATCH] fix: Email based automation conditions filter (#6786) --- .../settings/automation/constants.js | 28 +++++++++++++++++++ lib/automation_rules/conditions.json | 7 +++++ 2 files changed, 35 insertions(+) diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/constants.js b/app/javascript/dashboard/routes/dashboard/settings/automation/constants.js index 1f3414809..c3a0ffede 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/constants.js +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/constants.js @@ -21,6 +21,13 @@ export const AUTOMATIONS = { inputType: 'plain_text', filterOperators: OPERATOR_TYPES_2, }, + { + key: 'email', + name: 'Email', + attributeI18nKey: 'EMAIL', + inputType: 'plain_text', + filterOperators: OPERATOR_TYPES_2, + }, { key: 'inbox_id', name: 'Inbox', @@ -125,6 +132,13 @@ export const AUTOMATIONS = { inputType: 'plain_text', filterOperators: OPERATOR_TYPES_2, }, + { + key: 'email', + name: 'Email', + attributeI18nKey: 'EMAIL', + inputType: 'plain_text', + filterOperators: OPERATOR_TYPES_2, + }, { key: 'inbox_id', name: 'Inbox', @@ -242,6 +256,13 @@ export const AUTOMATIONS = { inputType: 'search_select', filterOperators: OPERATOR_TYPES_3, }, + { + key: 'email', + name: 'Email', + attributeI18nKey: 'EMAIL', + inputType: 'plain_text', + filterOperators: OPERATOR_TYPES_2, + }, { key: 'inbox_id', name: 'Inbox', @@ -317,6 +338,13 @@ export const AUTOMATIONS = { inputType: 'search_select', filterOperators: OPERATOR_TYPES_1, }, + { + key: 'email', + name: 'Email', + attributeI18nKey: 'EMAIL', + inputType: 'plain_text', + filterOperators: OPERATOR_TYPES_2, + }, { key: 'mail_subject', name: 'Email Subject', diff --git a/lib/automation_rules/conditions.json b/lib/automation_rules/conditions.json index 566a35de2..954d57470 100644 --- a/lib/automation_rules/conditions.json +++ b/lib/automation_rules/conditions.json @@ -156,6 +156,13 @@ "filter_operators": [ "equal_to", "not_equal_to", "contains", "does_not_contain" ], "attribute_type": "additional_attributes" }, + "email": { + "attribute_name": "Email", + "input_type": "textbox", + "data_type": "text", + "filter_operators": [ "equal_to", "not_equal_to", "contains", "does_not_contain" ], + "attribute_type": "standard" + }, "country_code": { "attribute_name": "Country Name", "input_type": "textbox",