Skip to content

Commit

Permalink
Merge pull request #37786 from Expensify/cmartins-fixDefaultAutoRepor…
Browse files Browse the repository at this point in the history
…tingFrequency

[CP Stag] Fix default autoreportingfrequency

(cherry picked from commit 4fdf17e)
  • Loading branch information
roryabraham authored and OSBotify committed Mar 5, 2024
1 parent eb0593a commit f5b1e1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ function setWorkspaceAutoReporting(policyID: string, enabled: boolean) {
harvesting: {
enabled: true,
},
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.WEEKLY,
pendingFields: {isAutoApprovalEnabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE},
},
},
Expand All @@ -423,6 +424,7 @@ function setWorkspaceAutoReporting(policyID: string, enabled: boolean) {
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
autoReporting: !enabled,
autoReportingFrequency: null,
pendingFields: {isAutoApprovalEnabled: null, harvesting: null},
},
},
Expand Down

0 comments on commit f5b1e1b

Please sign in to comment.