From 273ce1b993e1d970ba2021d39e58d59e052d73dc Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Tue, 10 Dec 2024 10:18:34 +0100 Subject: [PATCH 1/2] remove reportActionID from report type --- src/libs/DebugUtils.ts | 2 -- src/types/onyx/Report.ts | 3 --- tests/unit/MiddlewareTest.ts | 2 -- tests/utils/collections/optionData.ts | 1 - 4 files changed, 8 deletions(-) diff --git a/src/libs/DebugUtils.ts b/src/libs/DebugUtils.ts index 673ca8ec0c4f..9343164db1e8 100644 --- a/src/libs/DebugUtils.ts +++ b/src/libs/DebugUtils.ts @@ -458,7 +458,6 @@ function validateReportDraftProperty(key: keyof Report, value: string) { case 'policyID': case 'reportName': case 'reportID': - case 'reportActionID': case 'chatReportID': case 'type': case 'lastMessageTranslationKey': @@ -595,7 +594,6 @@ function validateReportDraftProperty(key: keyof Report, value: string) { hasParentAccess: CONST.RED_BRICK_ROAD_PENDING_ACTION, isDeletedParentAction: CONST.RED_BRICK_ROAD_PENDING_ACTION, reportName: CONST.RED_BRICK_ROAD_PENDING_ACTION, - reportActionID: CONST.RED_BRICK_ROAD_PENDING_ACTION, chatReportID: CONST.RED_BRICK_ROAD_PENDING_ACTION, stateNum: CONST.RED_BRICK_ROAD_PENDING_ACTION, statusNum: CONST.RED_BRICK_ROAD_PENDING_ACTION, diff --git a/src/types/onyx/Report.ts b/src/types/onyx/Report.ts index 500828dcf15a..b89b6c8e0777 100644 --- a/src/types/onyx/Report.ts +++ b/src/types/onyx/Report.ts @@ -127,9 +127,6 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** ID of the report */ reportID: string; - /** ID of the report action */ - reportActionID?: string; - /** ID of the chat report */ chatReportID?: string; diff --git a/tests/unit/MiddlewareTest.ts b/tests/unit/MiddlewareTest.ts index 82ac1aa74852..b1c8843a321e 100644 --- a/tests/unit/MiddlewareTest.ts +++ b/tests/unit/MiddlewareTest.ts @@ -54,7 +54,6 @@ describe('Middleware', () => { TestHelper.assertFormDataMatchesObject( { reportID: '1234', - reportActionID: '5678', }, ((global.fetch as jest.Mock).mock.calls.at(1) as FormDataObject[]).at(1)?.body, ); @@ -109,7 +108,6 @@ describe('Middleware', () => { TestHelper.assertFormDataMatchesObject( { reportID: '5555', - reportActionID: '5678', }, ((global.fetch as jest.Mock).mock.calls.at(1) as FormDataObject[]).at(1)?.body, ); diff --git a/tests/utils/collections/optionData.ts b/tests/utils/collections/optionData.ts index f3360361962d..adbb204cfc2d 100644 --- a/tests/utils/collections/optionData.ts +++ b/tests/utils/collections/optionData.ts @@ -36,7 +36,6 @@ export default function createRandomOptionData(index: number): OptionData { description: randWord(), isDeletedParentAction: randBoolean(), reportName: randWord(), - reportActionID: `reportAction_${index}`, chatReportID: `chatReport_${index}`, stateNum: rand(Object.values(CONST.REPORT.STATE_NUM)), statusNum: rand(Object.values(CONST.REPORT.STATUS_NUM)), From ab90c6d6b1891e151a6d846595dc3fc42f29d388 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Tue, 10 Dec 2024 12:08:36 +0100 Subject: [PATCH 2/2] remove key from whitelisted keys --- src/types/utils/whitelistedReportKeys.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/types/utils/whitelistedReportKeys.ts b/src/types/utils/whitelistedReportKeys.ts index 790edf6f550e..015420683925 100644 --- a/src/types/utils/whitelistedReportKeys.ts +++ b/src/types/utils/whitelistedReportKeys.ts @@ -26,7 +26,6 @@ type WhitelistedReport = OnyxCommon.OnyxValueWithOfflineFeedback< policyID: unknown; reportName: unknown; reportID: string; - reportActionID: unknown; chatReportID: unknown; stateNum: unknown; statusNum: unknown;