[Hold Web-E#51057] Don't enable harvesting if auto reporting is manual#83810
[Hold Web-E#51057] Don't enable harvesting if auto reporting is manual#83810s77rt wants to merge 1 commit intoExpensify:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d06c587a57
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| 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, |
There was a problem hiding this comment.
Avoid forcing manual mode for all immediate frequencies
autoReportingFrequency === IMMEDIATE represents both Daily (harvesting.enabled=true) and Manual (harvesting.enabled=false), so this condition disables harvesting for both cases. As a result, if a workspace was set to Daily, then submissions are turned off and on again, it is silently converted to Manual and scheduled submissions stop running automatically. This is a behavior regression introduced by the new guard and should only apply when the prior corrected frequency is actually Manual.
Useful? React with 👍 / 👎.
Explanation of Change
When enabling submissions, don't enable harvesting if auto reporting was set to "Manually", so we preserve the selection.
Note: This has a side-effect, now if you select "Daily", disable submission and enable it again, then "Manually" will be selected.
Fixed Issues
$ #72901
PROPOSAL:
Tests
Screen.Recording.2026-03-01.at.11.16.19.PM.mov
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari