Repository navigation
Conversation
The option is offered whenever every selected expense is on a managed card, but that flag carries no feed or workspace identity, so a selection holding another submitter's own-workspace card expense is offered the option and then rejected by the backend, leaving an error on the expense. Gate both the bulk-action entry point and the menu row on CONST.REPORT.IS_AUTO_REPORT_ENABLED so the feature is hidden until the guard can also confirm every card belongs to a feed on a workspace the mover administers. Co-authored-by: mkhutornyi <mkhutornyi@users.noreply.github.com>
|
@MelvinBot remove automated tests. No need for this PR |
DetailsExplanation of ChangeHides the
In the deploy blocker's repro the admin selects another submitter's card expense that lives on that submitter's own workspace feed, visible only because they moved it onto a draft report in the shared workspace. The App offers The real fix needs a fourth guard resolving each expense's card feed to a policy and checking
Everything else from #99688 — Fixed Issues$ #101767 Tests
Offline testsQA Steps
PR Author Checklist
@MelvinBot please set the PR body to the content in the details section above |
|
I think this isn't needed, see https://expensify.slack.com/archives/C01GTK53T8Q/p1790014917074249?thread_ts=1790012057.517709&cid=C01GTK53T8Q |
|
🤖 Done — the PR body is now set to the content you provided, verbatim. I read it back from the API and compared it against what you sent: the explanation, One thing worth flagging rather than silently leaving: this PR is currently closed, so the body edit doesn't put it back in the review flow. Reopen it if that was the intent. |






Explanation of Change
Hides the
Auto reportoption added in #99688 instead of reverting that PR, permkhutornyi's call on the deploy blocker.Auto reportis offered whenever every selected expense is on a managed card. The check behind that isisManagedCardTransaction, which reads a plainmanagedCardboolean off the transaction — it carries no feed, domain, or workspace identity. So the guard proves "this expense is on a managed card", never "this expense is on a card feed the acting admin can resolve a destination in".In the deploy blocker's repro the admin selects another submitter's card expense that lives on that submitter's own workspace feed, visible only because they moved it onto a draft report in the shared workspace. The App offers
Auto report, firesCHANGE_TRANSACTIONS_REPORTwithreportID: '-3'for the whole batch, the backend can't resolve a destination for the foreign-feed expense, and the batch fails. BecauseautoReportTransactionsships no optimistic data, the only visible outcome isgenericEditFailureMessagestamped on the expense — the error the tester reported.The real fix needs a fourth guard resolving each expense's card feed to a policy and checking
isPolicyAdmin, which is data the App does not have on the transaction today. That is not a deploy-blocker-sized change, so this PR gates the feature off instead:CONST.REPORT.IS_AUTO_REPORT_ENABLED: falsenext toAUTOMATIC_REPORT_ID, with a comment recording exactly what has to be true before it is flipped back on.canAutoReportAcrossSubmittersinuseSearchBulkActionson it, so a mixed-submitter selection no longer gets aMove expensesbulk action at all. Without this the user would land in the RHP with a stripped report list and no valid destination.autoReportOptionrow inIOURequestEditReportCommonon it, so the row cannot render even if some other caller wires the props.Everything else from #99688 —
autoReportTransactions,AUTOMATIC_REPORT_ID, the translations, the row markup — is left intact, so re-landing is a one-line flip once the guard is complete.Fixed Issues
$ #101767
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.