From 86b0c56dbfa0b20f4ab331bdd4f8c239f1d20a7a Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Fri, 24 Mar 2023 17:22:26 -0400
Subject: [PATCH 01/19] add regex and conditional

---
 src/CONST.js                   | 1 +
 src/libs/ReportActionsUtils.js | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/src/CONST.js b/src/CONST.js
index 1981eaff576e..814b8bd01362 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -337,6 +337,7 @@ const CONST = {
                 IOU: 'IOU',
                 RENAMED: 'RENAMED',
                 CHRONOSOOOLIST: 'CHRONOSOOOLIST',
+                POLICYCHANGELOG_REGEX: /^POLICYCHANGELOG_/,
             },
         },
         ARCHIVE_REASON: {
diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js
index df55ae49faee..9c2635f69d3d 100644
--- a/src/libs/ReportActionsUtils.js
+++ b/src/libs/ReportActionsUtils.js
@@ -193,6 +193,11 @@ function getSortedReportActionsForDisplay(reportActions) {
     const filteredReportActions = filterOutDeprecatedReportActions(reportActions);
     const sortedReportActions = getSortedReportActions(filteredReportActions, true);
     return _.filter(sortedReportActions, (reportAction) => {
+        // Allow all Policy Change reportActions to be displayed
+        if (CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(reportAction.actionName)) {
+            return true;
+        }
+
         // Filter out any unsupported reportAction types
         if (!_.has(CONST.REPORT.ACTIONS.TYPE, reportAction.actionName)) {
             return false;

From 8bb7a42fe138b3513b6258fcb6fdcea0397afd37 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Fri, 24 Mar 2023 17:55:29 -0400
Subject: [PATCH 02/19] create PolicyChangeLogActionItem

---
 .../PolicyChangeLogActionItem.js              | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 src/components/ReportActionItem/PolicyChangeLogActionItem.js

diff --git a/src/components/ReportActionItem/PolicyChangeLogActionItem.js b/src/components/ReportActionItem/PolicyChangeLogActionItem.js
new file mode 100644
index 000000000000..f2fbec367905
--- /dev/null
+++ b/src/components/ReportActionItem/PolicyChangeLogActionItem.js
@@ -0,0 +1,21 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import Text from '../Text';
+import styles from '../../styles/styles';
+import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
+
+const propTypes = {
+    /** All the data of the action */
+    action: PropTypes.shape(reportActionPropTypes).isRequired,
+};
+
+const PolicyChangeLogActionItem = props => (
+    <Text style={[styles.pv3, styles.ph5, styles.textLabelSupporting]}>
+        {props.action.text}
+    </Text>
+);
+
+PolicyChangeLogActionItem.propTypes = propTypes;
+PolicyChangeLogActionItem.displayName = 'PolicyChangeLogActionItem';
+
+export default PolicyChangeLogActionItem;

From 1eee7004adf4c01d783b73a6da1ee4439d4e25e3 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Fri, 24 Mar 2023 18:03:43 -0400
Subject: [PATCH 03/19] add PolicyChangeLogActionItem to ReportActionItem

---
 src/pages/home/report/ReportActionItem.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index d06e75de566f..6e893deb244b 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -38,6 +38,7 @@ import focusTextInputAfterAnimation from '../../../libs/focusTextInputAfterAnima
 import ChronosOOOListActions from '../../../components/ReportActionItem/ChronosOOOListActions';
 import ReportActionItemReactions from '../../../components/Reactions/ReportActionItemReactions';
 import * as Report from '../../../libs/actions/Report';
+import PolicyChangeLogActionItem from '../../../components/ReportActionItem/PolicyChangeLogActionItem';
 
 const propTypes = {
     /** Report for this action */
@@ -228,6 +229,9 @@ class ReportActionItem extends Component {
         if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST) {
             return <ChronosOOOListActions action={this.props.action} reportID={this.props.report.reportID} />;
         }
+        if (CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName)) {
+            return <PolicyChangeLogActionItem action={this.props.action} />;
+        }
         return (
             <PressableWithSecondaryInteraction
                 pointerEvents={this.props.action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? 'none' : 'auto'}

From 0acb700c19ff09c98a8df4b9ba7d3d1a95e2b234 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 14:40:29 +0000
Subject: [PATCH 04/19] revert changes to PolicyChangeLogActionItem

---
 .../PolicyChangeLogActionItem.js              | 21 -------------------
 src/pages/home/report/ReportActionItem.js     |  3 ---
 2 files changed, 24 deletions(-)
 delete mode 100644 src/components/ReportActionItem/PolicyChangeLogActionItem.js

diff --git a/src/components/ReportActionItem/PolicyChangeLogActionItem.js b/src/components/ReportActionItem/PolicyChangeLogActionItem.js
deleted file mode 100644
index f2fbec367905..000000000000
--- a/src/components/ReportActionItem/PolicyChangeLogActionItem.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Text from '../Text';
-import styles from '../../styles/styles';
-import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
-
-const propTypes = {
-    /** All the data of the action */
-    action: PropTypes.shape(reportActionPropTypes).isRequired,
-};
-
-const PolicyChangeLogActionItem = props => (
-    <Text style={[styles.pv3, styles.ph5, styles.textLabelSupporting]}>
-        {props.action.text}
-    </Text>
-);
-
-PolicyChangeLogActionItem.propTypes = propTypes;
-PolicyChangeLogActionItem.displayName = 'PolicyChangeLogActionItem';
-
-export default PolicyChangeLogActionItem;
diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index 6e893deb244b..7c5d8be14168 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -229,9 +229,6 @@ class ReportActionItem extends Component {
         if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST) {
             return <ChronosOOOListActions action={this.props.action} reportID={this.props.report.reportID} />;
         }
-        if (CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName)) {
-            return <PolicyChangeLogActionItem action={this.props.action} />;
-        }
         return (
             <PressableWithSecondaryInteraction
                 pointerEvents={this.props.action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? 'none' : 'auto'}

From e7e76353fe36b730cfb7daf8b6af460ff759216e Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 14:41:12 +0000
Subject: [PATCH 05/19] rm unused import

---
 src/pages/home/report/ReportActionItem.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index 7c5d8be14168..d06e75de566f 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -38,7 +38,6 @@ import focusTextInputAfterAnimation from '../../../libs/focusTextInputAfterAnima
 import ChronosOOOListActions from '../../../components/ReportActionItem/ChronosOOOListActions';
 import ReportActionItemReactions from '../../../components/Reactions/ReportActionItemReactions';
 import * as Report from '../../../libs/actions/Report';
-import PolicyChangeLogActionItem from '../../../components/ReportActionItem/PolicyChangeLogActionItem';
 
 const propTypes = {
     /** Report for this action */

From 9a9bf8bfc54427cf7de131d63308a5bb45e14560 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 14:47:22 +0000
Subject: [PATCH 06/19] add styles to system message

---
 src/pages/home/report/ReportActionItem.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index d06e75de566f..86d252ef9472 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -182,7 +182,10 @@ class ReportActionItem extends Component {
                         ? (
                             <ReportActionItemMessage
                                 action={this.props.action}
-                                style={(!this.props.displayAsGroup && isAttachment) ? [styles.mt2] : undefined}
+                                style={[
+                                    (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
+                                    CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName) ? styles.buttonSuccessDisabled : undefined,
+                                ]}
                             />
                         ) : (
                             <ReportActionItemMessageEdit

From 34b9e2b0833eb29c94fffef6d90e502a282dfc3d Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 14:51:58 +0000
Subject: [PATCH 07/19] update color

---
 src/pages/home/report/ReportActionItem.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index 86d252ef9472..e23e10b4ec89 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -184,7 +184,7 @@ class ReportActionItem extends Component {
                                 action={this.props.action}
                                 style={[
                                     (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
-                                    CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName) ? styles.buttonSuccessDisabled : undefined,
+                                    CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName) ? styles.colorMuted : undefined,
                                 ]}
                             />
                         ) : (

From 168c5a5ae40e9f277d7adc45d652b317fe2d8f79 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 15:19:41 +0000
Subject: [PATCH 08/19] use startsWith instead of regex

---
 src/CONST.js                              | 2 +-
 src/libs/ReportActionsUtils.js            | 2 +-
 src/pages/home/report/ReportActionItem.js | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/CONST.js b/src/CONST.js
index 814b8bd01362..84f7ef267863 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -337,7 +337,7 @@ const CONST = {
                 IOU: 'IOU',
                 RENAMED: 'RENAMED',
                 CHRONOSOOOLIST: 'CHRONOSOOOLIST',
-                POLICYCHANGELOG_REGEX: /^POLICYCHANGELOG_/,
+                POLICYCHANGELOG: 'POLICYCHANGELOG_',
             },
         },
         ARCHIVE_REASON: {
diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js
index 9c2635f69d3d..e10091484611 100644
--- a/src/libs/ReportActionsUtils.js
+++ b/src/libs/ReportActionsUtils.js
@@ -194,7 +194,7 @@ function getSortedReportActionsForDisplay(reportActions) {
     const sortedReportActions = getSortedReportActions(filteredReportActions, true);
     return _.filter(sortedReportActions, (reportAction) => {
         // Allow all Policy Change reportActions to be displayed
-        if (CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(reportAction.actionName)) {
+        if (reportAction.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) {
             return true;
         }
 
diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index e23e10b4ec89..e9f8ae9b3e70 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -184,7 +184,7 @@ class ReportActionItem extends Component {
                                 action={this.props.action}
                                 style={[
                                     (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
-                                    CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(this.props.action.actionName) ? styles.colorMuted : undefined,
+                                    this.props.action.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG) ? styles.colorMuted : undefined,
                                 ]}
                             />
                         ) : (

From 55d155f2e58463bfaa46374021986d543fe9da2e Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 15:41:27 +0000
Subject: [PATCH 09/19] fix tests

---
 src/libs/ReportActionsUtils.js            | 2 +-
 src/pages/home/report/ReportActionItem.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js
index e10091484611..ad937855b4ba 100644
--- a/src/libs/ReportActionsUtils.js
+++ b/src/libs/ReportActionsUtils.js
@@ -194,7 +194,7 @@ function getSortedReportActionsForDisplay(reportActions) {
     const sortedReportActions = getSortedReportActions(filteredReportActions, true);
     return _.filter(sortedReportActions, (reportAction) => {
         // Allow all Policy Change reportActions to be displayed
-        if (reportAction.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) {
+        if (reportAction.actionName && reportAction.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) {
             return true;
         }
 
diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index e9f8ae9b3e70..86bc7caee15f 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -184,7 +184,7 @@ class ReportActionItem extends Component {
                                 action={this.props.action}
                                 style={[
                                     (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
-                                    this.props.action.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG) ? styles.colorMuted : undefined,
+                                    (this.props.action.actionName && this.props.action.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) ? styles.colorMuted : undefined,
                                 ]}
                             />
                         ) : (

From 3b89cae88af31d5b3c70fb3ba82e46b7f6976ec4 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 16:44:15 +0000
Subject: [PATCH 10/19] simplify logic and add specific consts

---
 src/CONST.js                              | 4 +++-
 src/libs/ReportActionsUtils.js            | 7 +------
 src/pages/home/report/ReportActionItem.js | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/CONST.js b/src/CONST.js
index 84f7ef267863..4b746056aff8 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -337,7 +337,9 @@ const CONST = {
                 IOU: 'IOU',
                 RENAMED: 'RENAMED',
                 CHRONOSOOOLIST: 'CHRONOSOOOLIST',
-                POLICYCHANGELOG: 'POLICYCHANGELOG_',
+                POLICYCHANGELOG: {
+                    POLICYCHANGELOG_UPDATE_FIELD: 'POLICYCHANGELOG_UPDATE_FIELD',
+                },
             },
         },
         ARCHIVE_REASON: {
diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js
index ad937855b4ba..95947277f759 100644
--- a/src/libs/ReportActionsUtils.js
+++ b/src/libs/ReportActionsUtils.js
@@ -193,13 +193,8 @@ function getSortedReportActionsForDisplay(reportActions) {
     const filteredReportActions = filterOutDeprecatedReportActions(reportActions);
     const sortedReportActions = getSortedReportActions(filteredReportActions, true);
     return _.filter(sortedReportActions, (reportAction) => {
-        // Allow all Policy Change reportActions to be displayed
-        if (reportAction.actionName && reportAction.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) {
-            return true;
-        }
-
         // Filter out any unsupported reportAction types
-        if (!_.has(CONST.REPORT.ACTIONS.TYPE, reportAction.actionName)) {
+        if (!_.has(CONST.REPORT.ACTIONS.TYPE, reportAction.actionName) && !_.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, reportAction.actionName)) {
             return false;
         }
 
diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index 86bc7caee15f..acff50c9e650 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -184,7 +184,7 @@ class ReportActionItem extends Component {
                                 action={this.props.action}
                                 style={[
                                     (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
-                                    (this.props.action.actionName && this.props.action.actionName.startsWith(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG)) ? styles.colorMuted : undefined,
+                                    _.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, this.props.action.actionName) ? styles.colorMuted : undefined,
                                 ]}
                             />
                         ) : (

From 00ed57f401913b77126bf5ca2f1955284c2ee4d0 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 17:06:38 +0000
Subject: [PATCH 11/19] add all policy change log types

---
 src/CONST.js | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/CONST.js b/src/CONST.js
index 4b746056aff8..c322fd79722d 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -338,6 +338,45 @@ const CONST = {
                 RENAMED: 'RENAMED',
                 CHRONOSOOOLIST: 'CHRONOSOOOLIST',
                 POLICYCHANGELOG: {
+                    POLICYCHANGELOG_UPDATE_NAME: 'POLICYCHANGELOG_UPDATE_NAME',
+                    POLICYCHANGELOG_UPDATE_CURRENCY: 'POLICYCHANGELOG_UPDATE_CURRENCY',
+                    POLICYCHANGELOG_UPDATE_OWNERSHIP: 'POLICYCHANGELOG_UPDATE_OWNERSHIP',
+                    POLICYCHANGELOG_UPDATE_AUTOHARVESTING: 'POLICYCHANGELOG_UPDATE_AUTOHARVESTING',
+                    POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY: 'POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY',
+                    POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED',
+                    POLICYCHANGELOG_UPDATE_REPORT_FIELD: 'POLICYCHANGELOG_UPDATE_REPORT_FIELD',
+                    POLICYCHANGELOG_ADD_REPORT_FIELD: 'POLICYCHANGELOG_ADD_REPORT_FIELD',
+                    POLICYCHANGELOG_DELETE_REPORT_FIELD: 'POLICYCHANGELOG_DELETE_REPORT_FIELD',
+                    POLICYCHANGELOG_UPDATE_DEFAULT_TITLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE',
+                    POLICYCHANGELOG_ADD_CATEGORY: 'POLICYCHANGELOG_ADD_CATEGORY',
+                    POLICYCHANGELOG_DELETE_CATEGORY: 'POLICYCHANGELOG_DELETE_CATEGORY',
+                    POLICYCHANGELOG_SET_CATEGORY_NAME: 'POLICYCHANGELOG_SET_CATEGORY_NAME',
+                    POLICYCHANGELOG_UPDATE_CATEGORY: 'POLICYCHANGELOG_UPDATE_CATEGORY',
+                    POLICYCHANGELOG_ADD_TAG: 'POLICYCHANGELOG_ADD_TAG',
+                    POLICYCHANGELOG_UPDATE_TAG: 'POLICYCHANGELOG_UPDATE_TAG',
+                    POLICYCHANGELOG_DELETE_TAG: 'POLICYCHANGELOG_DELETE_TAG',
+                    POLICYCHANGELOG_UPDATE_TAG_NAME: 'POLICYCHANGELOG_UPDATE_TAG_NAME',
+                    POLICYCHANGELOG_UPDATE_TAG_LIST_NAME: 'POLICYCHANGELOG_UPDATE_TAG_LIST_NAME',
+                    POLICYCHANGELOG_IMPORT_TAGS: 'POLICYCHANGELOG_IMPORT_TAGS',
+                    POLICYCHANGELOG_DELETE_ALL_TAGS: 'POLICYCHANGELOG_DELETE_ALL_TAGS',
+                    POLICYCHANGELOG_ADD_APPROVER_RULE: 'POLICYCHANGELOG_ADD_APPROVER_RULE',
+                    POLICYCHANGELOG_UPDATE_APPROVER_RULE: 'POLICYCHANGELOG_UPDATE_APPROVER_RULE',
+                    POLICYCHANGELOG_DELETE_APPROVER_RULE: 'POLICYCHANGELOG_DELETE_APPROVER_RULE',
+                    POLICYCHANGELOG_ADD_EMPLOYEE: 'POLICYCHANGELOG_ADD_EMPLOYEE',
+                    POLICYCHANGELOG_DELETE_EMPLOYEE: 'POLICYCHANGELOG_DELETE_EMPLOYEE',
+                    POLICYCHANGELOG_UPDATE_EMPLOYEE: 'POLICYCHANGELOG_UPDATE_EMPLOYEE',
+                    POLICYCHANGELOG_SET_AUTO_JOIN: 'POLICYCHANGELOG_SET_AUTO_JOIN',
+                    POLICYCHANGELOG_ADD_INTEGRATION: 'POLICYCHANGELOG_ADD_INTEGRATION',
+                    POLICYCHANGELOG_DELETE_INTEGRATION: 'POLICYCHANGELOG_DELETE_INTEGRATION',
+                    POLICYCHANGELOG_UPDATE_ACH_ACCOUNT: 'POLICYCHANGELOG_UPDATE_ACH_ACCOUNT',
+                    POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE: 'POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE',
+                    POLICYCHANGELOG_SET_AUTOREIMBURSEMENT: 'POLICYCHANGELOG_SET_AUTOREIMBURSEMENT',
+                    POLICYCHANGELOG_ADD_CUSTOM_UNIT: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT',
+                    POLICYCHANGELOG_DELETE_CUSTOM_UNIT: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT',
+                    POLICYCHANGELOG_UPDATE_CUSTOM_UNIT: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT',
+                    POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE',
+                    POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE',
+                    POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE',
                     POLICYCHANGELOG_UPDATE_FIELD: 'POLICYCHANGELOG_UPDATE_FIELD',
                 },
             },

From f3ed5da16c35549128beba8f44c6826f8a5025a7 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 17:12:43 +0000
Subject: [PATCH 12/19] update test

---
 tests/unit/ReportActionsUtilsTest.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/unit/ReportActionsUtilsTest.js b/tests/unit/ReportActionsUtilsTest.js
index 20bf389969b7..5242e6626dc5 100644
--- a/tests/unit/ReportActionsUtilsTest.js
+++ b/tests/unit/ReportActionsUtilsTest.js
@@ -143,6 +143,12 @@ describe('ReportActionsUtils', () => {
                 },
                 {
                     created: '2022-11-09 22:27:01.825',
+                    reportActionID: '8049485084562457',
+                    actionName: CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.POLICYCHANGELOG_UPDATE_FIELD,
+                    message: [{html: 'updated the Approval Mode from "Submit and Approve" to "Submit and Close"'}],
+                },
+                {
+                    created: '2022-11-08 22:27:01.825',
                     reportActionID: '1661970171066218',
                     actionName: 'REIMBURSED',
                     message: [{html: 'Hello world'}],

From dcff1f2efd0db6bd00dc628ed83113a35cb52ffb Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Mon, 27 Mar 2023 17:18:04 +0000
Subject: [PATCH 13/19] disable reactions

---
 src/pages/home/report/ContextMenu/ContextMenuActions.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js
index cab49dcc3c9c..b36863ec1110 100644
--- a/src/pages/home/report/ContextMenu/ContextMenuActions.js
+++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js
@@ -40,7 +40,12 @@ const CONTEXT_MENU_TYPES = {
 export default [
     {
         shouldKeepOpen: true,
-        shouldShow: (type, reportAction) => type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU,
+        shouldShow: (type, reportAction) => (
+            type === CONTEXT_MENU_TYPES.REPORT_ACTION
+            && _.has(reportAction, 'message')
+            && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU
+            && !_.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, reportAction.actionName)
+        ),
         renderContent: (closePopover, {
             reportID, reportAction, close: closeManually, openContextMenu,
         }) => {

From 88f9878b61dc03c6811f87f498a124067f5ad0dd Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 11:10:45 +0000
Subject: [PATCH 14/19] revert disable reactions

---
 src/pages/home/report/ContextMenu/ContextMenuActions.js | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js
index b36863ec1110..a4eb2e9e574f 100644
--- a/src/pages/home/report/ContextMenu/ContextMenuActions.js
+++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js
@@ -40,12 +40,7 @@ const CONTEXT_MENU_TYPES = {
 export default [
     {
         shouldKeepOpen: true,
-        shouldShow: (type, reportAction) => (
-            type === CONTEXT_MENU_TYPES.REPORT_ACTION
-            && _.has(reportAction, 'message')
-            && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU
-            && !_.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, reportAction.actionName)
-        ),
+        shouldShow: (type, reportAction) => ( type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU),
         renderContent: (closePopover, {
             reportID, reportAction, close: closeManually, openContextMenu,
         }) => {

From fee39d45228ca1994b8b790d89dba568873dc19b Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 11:12:31 +0000
Subject: [PATCH 15/19] rm parenthesis

---
 src/pages/home/report/ContextMenu/ContextMenuActions.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js
index a4eb2e9e574f..cab49dcc3c9c 100644
--- a/src/pages/home/report/ContextMenu/ContextMenuActions.js
+++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js
@@ -40,7 +40,7 @@ const CONTEXT_MENU_TYPES = {
 export default [
     {
         shouldKeepOpen: true,
-        shouldShow: (type, reportAction) => ( type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU),
+        shouldShow: (type, reportAction) => type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU,
         renderContent: (closePopover, {
             reportID, reportAction, close: closeManually, openContextMenu,
         }) => {

From e6552c4534361585959c0d75da02339328ff18f3 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 12:36:46 +0000
Subject: [PATCH 16/19] rm POLICYCHANGELOG prefix

---
 src/CONST.js | 80 ++++++++++++++++++++++++++--------------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/CONST.js b/src/CONST.js
index c322fd79722d..c23f5d0fbe0a 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -338,46 +338,46 @@ const CONST = {
                 RENAMED: 'RENAMED',
                 CHRONOSOOOLIST: 'CHRONOSOOOLIST',
                 POLICYCHANGELOG: {
-                    POLICYCHANGELOG_UPDATE_NAME: 'POLICYCHANGELOG_UPDATE_NAME',
-                    POLICYCHANGELOG_UPDATE_CURRENCY: 'POLICYCHANGELOG_UPDATE_CURRENCY',
-                    POLICYCHANGELOG_UPDATE_OWNERSHIP: 'POLICYCHANGELOG_UPDATE_OWNERSHIP',
-                    POLICYCHANGELOG_UPDATE_AUTOHARVESTING: 'POLICYCHANGELOG_UPDATE_AUTOHARVESTING',
-                    POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY: 'POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY',
-                    POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED',
-                    POLICYCHANGELOG_UPDATE_REPORT_FIELD: 'POLICYCHANGELOG_UPDATE_REPORT_FIELD',
-                    POLICYCHANGELOG_ADD_REPORT_FIELD: 'POLICYCHANGELOG_ADD_REPORT_FIELD',
-                    POLICYCHANGELOG_DELETE_REPORT_FIELD: 'POLICYCHANGELOG_DELETE_REPORT_FIELD',
-                    POLICYCHANGELOG_UPDATE_DEFAULT_TITLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE',
-                    POLICYCHANGELOG_ADD_CATEGORY: 'POLICYCHANGELOG_ADD_CATEGORY',
-                    POLICYCHANGELOG_DELETE_CATEGORY: 'POLICYCHANGELOG_DELETE_CATEGORY',
-                    POLICYCHANGELOG_SET_CATEGORY_NAME: 'POLICYCHANGELOG_SET_CATEGORY_NAME',
-                    POLICYCHANGELOG_UPDATE_CATEGORY: 'POLICYCHANGELOG_UPDATE_CATEGORY',
-                    POLICYCHANGELOG_ADD_TAG: 'POLICYCHANGELOG_ADD_TAG',
-                    POLICYCHANGELOG_UPDATE_TAG: 'POLICYCHANGELOG_UPDATE_TAG',
-                    POLICYCHANGELOG_DELETE_TAG: 'POLICYCHANGELOG_DELETE_TAG',
-                    POLICYCHANGELOG_UPDATE_TAG_NAME: 'POLICYCHANGELOG_UPDATE_TAG_NAME',
-                    POLICYCHANGELOG_UPDATE_TAG_LIST_NAME: 'POLICYCHANGELOG_UPDATE_TAG_LIST_NAME',
-                    POLICYCHANGELOG_IMPORT_TAGS: 'POLICYCHANGELOG_IMPORT_TAGS',
-                    POLICYCHANGELOG_DELETE_ALL_TAGS: 'POLICYCHANGELOG_DELETE_ALL_TAGS',
-                    POLICYCHANGELOG_ADD_APPROVER_RULE: 'POLICYCHANGELOG_ADD_APPROVER_RULE',
-                    POLICYCHANGELOG_UPDATE_APPROVER_RULE: 'POLICYCHANGELOG_UPDATE_APPROVER_RULE',
-                    POLICYCHANGELOG_DELETE_APPROVER_RULE: 'POLICYCHANGELOG_DELETE_APPROVER_RULE',
-                    POLICYCHANGELOG_ADD_EMPLOYEE: 'POLICYCHANGELOG_ADD_EMPLOYEE',
-                    POLICYCHANGELOG_DELETE_EMPLOYEE: 'POLICYCHANGELOG_DELETE_EMPLOYEE',
-                    POLICYCHANGELOG_UPDATE_EMPLOYEE: 'POLICYCHANGELOG_UPDATE_EMPLOYEE',
-                    POLICYCHANGELOG_SET_AUTO_JOIN: 'POLICYCHANGELOG_SET_AUTO_JOIN',
-                    POLICYCHANGELOG_ADD_INTEGRATION: 'POLICYCHANGELOG_ADD_INTEGRATION',
-                    POLICYCHANGELOG_DELETE_INTEGRATION: 'POLICYCHANGELOG_DELETE_INTEGRATION',
-                    POLICYCHANGELOG_UPDATE_ACH_ACCOUNT: 'POLICYCHANGELOG_UPDATE_ACH_ACCOUNT',
-                    POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE: 'POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE',
-                    POLICYCHANGELOG_SET_AUTOREIMBURSEMENT: 'POLICYCHANGELOG_SET_AUTOREIMBURSEMENT',
-                    POLICYCHANGELOG_ADD_CUSTOM_UNIT: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT',
-                    POLICYCHANGELOG_DELETE_CUSTOM_UNIT: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT',
-                    POLICYCHANGELOG_UPDATE_CUSTOM_UNIT: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT',
-                    POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE',
-                    POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE',
-                    POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE',
-                    POLICYCHANGELOG_UPDATE_FIELD: 'POLICYCHANGELOG_UPDATE_FIELD',
+                    UPDATE_NAME: 'POLICYCHANGELOG_UPDATE_NAME',
+                    UPDATE_CURRENCY: 'POLICYCHANGELOG_UPDATE_CURRENCY',
+                    UPDATE_OWNERSHIP: 'POLICYCHANGELOG_UPDATE_OWNERSHIP',
+                    UPDATE_AUTOHARVESTING: 'POLICYCHANGELOG_UPDATE_AUTOHARVESTING',
+                    UPDATE_AUTOREPORTING_FREQUENCY: 'POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY',
+                    UPDATE_DEFAULT_TITLE_ENFORCED: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED',
+                    UPDATE_REPORT_FIELD: 'POLICYCHANGELOG_UPDATE_REPORT_FIELD',
+                    ADD_REPORT_FIELD: 'POLICYCHANGELOG_ADD_REPORT_FIELD',
+                    DELETE_REPORT_FIELD: 'POLICYCHANGELOG_DELETE_REPORT_FIELD',
+                    UPDATE_DEFAULT_TITLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE',
+                    ADD_CATEGORY: 'POLICYCHANGELOG_ADD_CATEGORY',
+                    DELETE_CATEGORY: 'POLICYCHANGELOG_DELETE_CATEGORY',
+                    SET_CATEGORY_NAME: 'POLICYCHANGELOG_SET_CATEGORY_NAME',
+                    UPDATE_CATEGORY: 'POLICYCHANGELOG_UPDATE_CATEGORY',
+                    ADD_TAG: 'POLICYCHANGELOG_ADD_TAG',
+                    UPDATE_TAG: 'POLICYCHANGELOG_UPDATE_TAG',
+                    DELETE_TAG: 'POLICYCHANGELOG_DELETE_TAG',
+                    UPDATE_TAG_NAME: 'POLICYCHANGELOG_UPDATE_TAG_NAME',
+                    UPDATE_TAG_LIST_NAME: 'POLICYCHANGELOG_UPDATE_TAG_LIST_NAME',
+                    IMPORT_TAGS: 'POLICYCHANGELOG_IMPORT_TAGS',
+                    DELETE_ALL_TAGS: 'POLICYCHANGELOG_DELETE_ALL_TAGS',
+                    ADD_APPROVER_RULE: 'POLICYCHANGELOG_ADD_APPROVER_RULE',
+                    UPDATE_APPROVER_RULE: 'POLICYCHANGELOG_UPDATE_APPROVER_RULE',
+                    DELETE_APPROVER_RULE: 'POLICYCHANGELOG_DELETE_APPROVER_RULE',
+                    ADD_EMPLOYEE: 'POLICYCHANGELOG_ADD_EMPLOYEE',
+                    DELETE_EMPLOYEE: 'POLICYCHANGELOG_DELETE_EMPLOYEE',
+                    UPDATE_EMPLOYEE: 'POLICYCHANGELOG_UPDATE_EMPLOYEE',
+                    SET_AUTO_JOIN: 'POLICYCHANGELOG_SET_AUTO_JOIN',
+                    ADD_INTEGRATION: 'POLICYCHANGELOG_ADD_INTEGRATION',
+                    DELETE_INTEGRATION: 'POLICYCHANGELOG_DELETE_INTEGRATION',
+                    UPDATE_ACH_ACCOUNT: 'POLICYCHANGELOG_UPDATE_ACH_ACCOUNT',
+                    UPDATE_REIMBURSEMENT_CHOICE: 'POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE',
+                    SET_AUTOREIMBURSEMENT: 'POLICYCHANGELOG_SET_AUTOREIMBURSEMENT',
+                    ADD_CUSTOM_UNIT: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT',
+                    DELETE_CUSTOM_UNIT: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT',
+                    UPDATE_CUSTOM_UNIT: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT',
+                    UPDATE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE',
+                    ADD_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE',
+                    DELETE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE',
+                    UPDATE_FIELD: 'POLICYCHANGELOG_UPDATE_FIELD',
                 },
             },
         },

From 2e080fb00f0d66087a6b1ecd027929db75867c7a Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 12:37:13 +0000
Subject: [PATCH 17/19] fix test

---
 tests/unit/ReportActionsUtilsTest.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/unit/ReportActionsUtilsTest.js b/tests/unit/ReportActionsUtilsTest.js
index 5242e6626dc5..6b8fdbb04fa4 100644
--- a/tests/unit/ReportActionsUtilsTest.js
+++ b/tests/unit/ReportActionsUtilsTest.js
@@ -144,7 +144,7 @@ describe('ReportActionsUtils', () => {
                 {
                     created: '2022-11-09 22:27:01.825',
                     reportActionID: '8049485084562457',
-                    actionName: CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.POLICYCHANGELOG_UPDATE_FIELD,
+                    actionName: CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.UPDATE_FIELD,
                     message: [{html: 'updated the Approval Mode from "Submit and Approve" to "Submit and Close"'}],
                 },
                 {

From 24101a324ae5cc07a712984581881572e278ff31 Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 12:52:07 +0000
Subject: [PATCH 18/19] update contains logic

---
 package-lock.json                         | 2 +-
 src/libs/ReportActionsUtils.js            | 2 +-
 src/pages/home/report/ReportActionItem.js | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 3dd8033a7113..48a3e1b5b70f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -135,7 +135,7 @@
         "css-loader": "^6.7.2",
         "diff-so-fancy": "^1.3.0",
         "dotenv": "^16.0.3",
-        "electron": "^22.3.4",
+        "electron": "22.3.4",
         "electron-builder": "23.5.0",
         "electron-notarize": "^1.2.1",
         "eslint": "^7.6.0",
diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js
index 95947277f759..d18103e264d9 100644
--- a/src/libs/ReportActionsUtils.js
+++ b/src/libs/ReportActionsUtils.js
@@ -194,7 +194,7 @@ function getSortedReportActionsForDisplay(reportActions) {
     const sortedReportActions = getSortedReportActions(filteredReportActions, true);
     return _.filter(sortedReportActions, (reportAction) => {
         // Filter out any unsupported reportAction types
-        if (!_.has(CONST.REPORT.ACTIONS.TYPE, reportAction.actionName) && !_.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, reportAction.actionName)) {
+        if (!_.has(CONST.REPORT.ACTIONS.TYPE, reportAction.actionName) && !_.contains(_.values(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG), reportAction.actionName)) {
             return false;
         }
 
diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js
index acff50c9e650..6ce5715907e1 100644
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -184,7 +184,7 @@ class ReportActionItem extends Component {
                                 action={this.props.action}
                                 style={[
                                     (!this.props.displayAsGroup && isAttachment) ? styles.mt2 : undefined,
-                                    _.has(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG, this.props.action.actionName) ? styles.colorMuted : undefined,
+                                    _.contains(_.values(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG), this.props.action.actionName) ? styles.colorMuted : undefined,
                                 ]}
                             />
                         ) : (

From 1d0f6d14a58e39d0e118cdcc87d212c2786cf26c Mon Sep 17 00:00:00 2001
From: Carlos Martins <cmartins@expensify.com>
Date: Tue, 28 Mar 2023 15:09:03 +0000
Subject: [PATCH 19/19] revert package-lock.json changes

---
 package-lock.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package-lock.json b/package-lock.json
index 48a3e1b5b70f..3dd8033a7113 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -135,7 +135,7 @@
         "css-loader": "^6.7.2",
         "diff-so-fancy": "^1.3.0",
         "dotenv": "^16.0.3",
-        "electron": "22.3.4",
+        "electron": "^22.3.4",
         "electron-builder": "23.5.0",
         "electron-notarize": "^1.2.1",
         "eslint": "^7.6.0",
