From d06c587a576ac03f8fcbaae553a45f018111d24b Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sun, 1 Mar 2026 22:29:23 +0100 Subject: [PATCH] don't enable harvesting if auto reporting is manual --- src/libs/actions/Policy/Policy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 194e2aa90d11c..287fb79c64f52 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -671,7 +671,10 @@ function setWorkspaceAutoHarvesting(policy: Policy, enabled: boolean) { key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`, value: { autoReporting: enabled, - harvesting: {enabled}, + harvesting: { + // Auto-harvesting should never be on if auto reporting is set to manual (immediate with harvesting = false) + enabled: policy.autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.IMMEDIATE ? false : enabled, + }, pendingFields: { autoReporting: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, },