You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-24] [$250] Unable to mark reports as manually exported to QBO in ND #91086
Version Number: 9.3.74-6 Reproducible in staging?: Needs Reproduction (Unable to reproduce) Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@DGephart Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Logs in and goes to the Reports tab
Goes to Spend > Report
Opens a report > More > Export
There's no option to mark the report as manually exported, only gives an option to export to QB Online
Expected Result:
Based on this help document, admins have the ability to mark the report as manually exported once approved/paid
Actual Result:
The report is final approved, and no other action is required, but the Admin is unable to mark itas manually exported. Option available in Classic
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Select the officially supported platforms where the issue was reproduced:
changed the title [-]Unable to mark reports as manually exported in ND[/-][+]Unable to mark reports as manually exported to QBO in ND[/+]on May 19, 2026
godzillaxbox19982014-lgtm commented on May 19, 2026
Please re-state the problem that we are trying to solve in this issue.
Admins can open the export flow for an approved/paid expense report connected to QuickBooks Online, but they only see the option to export to QBO. They do not get the option to mark the report as manually exported.
What is the root cause of that problem?
The export menu is built from getSecondaryExportReportActions() in ReportSecondaryActionUtils.
For expense reports, isMarkAsExportedAction() currently allows the manual export option for:
the payer, when payments are enabled and the report is closed/approved
an admin only when accounting auto-sync is enabled
the preferred exporter when auto-sync is disabled
That misses the case from this issue: a workspace admin with a finished expense report and QBO connected, but auto-sync disabled / not treated as the preferred exporter. In that case EXPORT_TO_INTEGRATION can still appear, but MARK_AS_EXPORTED is filtered out.
What changes do you think we should make in order to solve the problem?
I would update the expense-report branch of isMarkAsExportedAction() so admins can mark a finished expense report as manually exported when there is a valid accounting connection, even if auto-sync is not enabled.
The fix should stay narrow:
keep all the existing checks for valid accounting connection, expense report, and finished report state
keep payer/exporter behaviour as-is
change the final admin/exporter condition so admins are not blocked just because QBO auto-sync is off
add a unit test in ReportSecondaryActionUtilsTest for an approved QBO expense report where the current user is an admin, auto-sync is disabled, and MARK_AS_EXPORTED is included
What alternative solutions did you explore? (Optional)
We could force admins to be the preferred exporter, but that does not match the expected behaviour from Classic/help docs. The smaller fix is to correct the permission check for the manual-export menu item only.
The "Mark as exported" option is gated by isMarkAsExportedAction, which has a gap in its payer path compared to isExportAction (the function that controls "Export to QBO").
The payer path in isExportAction (line 472) includes settled/reimbursed reports:
When a report is settled/reimbursed and the user is a payer with payments enabled, "Export to QBO" appears but "Mark as exported" does not — because the mark-as-exported payer path doesn't recognize settled reports. The function then falls through to the admin/exporter check (line 531), which requires either syncEnabled (for admins) or being the preferred exporter (without sync). If neither condition is met, the option is hidden.
What changes do you think we should make in order to solve the problem?
Add isReportSettled to the payer path condition in isMarkAsExportedAction at line 514, aligning it with isExportAction:
Change isReportClosedOrApproved to include settled reports, e.g.:
This ensures settled/reimbursed reports get the "Mark as exported" option under the same conditions that already grant "Export to integration".
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
The Export submenu in the report's More menu is assembled by useExportActions, which maps secondaryExportActions (returned from getSecondaryExportReportActions) into the visible options. Each option only renders if its corresponding gate returns true. For the two options the bug is about — "Export to QB Online" and "Mark as manually exported" — those gates are isExportAction and isMarkAsExportedAction in src/libs/ReportSecondaryActionUtils.ts.
isMarkAsExportedAction's payer branch is missing isReportSettled. So as soon as the report transitions to STATUS_NUM.REIMBURSED, the payer (an admin who paid the report from a personal/workspace bank account) sees "Export to QB Online" but loses "Mark as manually exported" — exactly the screenshot in the bug.
Then there's the non-payer admin branch, which is the more interesting parity gap:
isMarkAsExportedAction requires syncEnabled for an admin — i.e., only show "Mark as manually exported" when the integration's auto-sync is turned on. That is the wrong direction. The product purpose of "Mark as exported" is to record that the report was handled outside the auto-sync pipeline (manual export, CSV pull, side-channel reconciliation). It is needed most when auto-sync is off; when auto-sync is on, the system itself flips the exported state. The gate is currently inverted relative to the user-facing contract documented in the help article — "admins have the ability to mark the report as manually exported once approved/paid", with no sync-state condition.
The "Option available in Classic" line in the bug report points to the same observation: Classic shows this to admins whenever the report is in a finished state and there's a connected integration, regardless of auto-sync.
What changes do you think we should make in order to solve the problem?
Bring isMarkAsExportedAction's gates back to parity with isExportAction, and remove the inverted syncEnabled requirement on the admin branch.
Add isReportSettled to the payer branch so the payer admin keeps the option after the report is reimbursed — matches isExportAction's payer branch.
Drop the syncEnabled qualifiers on the admin/exporter branch. Admin or preferred exporter, finished report, connected integration → show the option. This matches the Classic behavior cited in the help article and matches the intent of "Mark as exported": a manual override for cases where the system did not export automatically.
exportSubmenuOptions[MARK_AS_EXPORTED] already exists in useExportActions.ts and is wired to markAsManuallyExported — no UI plumbing or new strings are needed. The fix is contained to one util function.
Why this over alternatives:
Patch useExportActions to always include MARK_AS_EXPORTED whenever an integration is connected. Rejected — pushes UX policy into the hook and bypasses the role/state gates that legitimately hide the option from non-admins or unfinished reports.
Keep syncEnabled gate but invert it (!syncEnabled). Rejected — would hide the option when auto-sync is on, even for admins who needed a manual override after a failed/partial sync. Classic shows it regardless; matching that is the documented contract.
Add a new "show even when sync is on" config flag on the policy. Rejected — unnecessary configuration surface for behavior the product already documents as universal for admins.
Regression watch: confirm non-admin / non-exporter users on the same workspace still don't see "Mark as manually exported" (the role gate remains). Confirm the option still hides when the report is still processing (still gated by isReportFinished). Confirm the gate still hides when the policy has no valid connected integration (hasAccountingConnection early-return is untouched). Confirm markAsManuallyExported action's optimistic + API path is exercised — it's already used from useExportActions.ts and the search bulk-actions hook, so no action-side changes are needed.
Verify: policy with QBO connection, auto-sync ON, admin user, report fully approved → More → Export → both "Export to QB Online" and "Mark as manually exported" should appear (today only the first shows). Repeat with auto-sync OFF — both should still appear for admin. Repeat with non-admin non-exporter — neither should appear. Repeat with the payer of a reimbursed report (status REIMBURSED) — both should appear (today "Mark as manually exported" disappears at reimbursement).
What alternative solutions did you explore? (Optional)
Inverting only the admin branch ((isAdmin && !syncEnabled) || (isExporter && !syncEnabled)). Rejected — when auto-sync is on but the integration is temporarily broken (token expired, QBO rate-limit), admins legitimately need the manual-export override to clear the report's exported state. Hiding it whenever sync is "on" still leaves admins blocked on real-world failure modes that's what the option exists for.
Surfacing "Mark as manually exported" only from the post-export "Export Again" confirmation modal (useExportAgainModal). Rejected — the help article and the Classic UX both put this in the primary Export submenu, not behind a re-export confirmation. The bug reporter explicitly compares to Classic, where it's a first-class menu entry.
Please re-state the problem that we are trying to solve in this issue.
An admin opens an approved expense report on a workspace connected to QBO and goes to More → Export. They see Export to QB Online but not Mark as manually exported. Per the help article and the Classic UI, admins must have the manual-export option once the report is approved/paid.
What is the root cause of that problem?
The Export submenu pulls MARK_AS_EXPORTED from getSecondaryExportReportActions, which gates the option on isMarkAsExportedAction at
So once an admin pays themselves and the report transitions to STATUS_NUM.REIMBURSED, Export to QBO still shows but Mark as manually exported drops out of the payer branch and falls through to the admin/exporter branch — which is broken by flaw 2.
2. Admin branch is inverted on syncEnabled — regression from a follow-up to PR #59999.
The function was bootstrapped in ad51938cd166 with the shape return isAdmin || isExporter, gated by !isReportFinished || syncEnabled. A follow-up commit 20e10b7fc4cc (fix 59999#issuecomment-2815226410, Apr 22 2025) split the gate to fix a different bug (PR #59999 — "Mark as exported" reappearing after a sync-toggle cycle), landing the current shape at
For admins, that AND-clause is the wrong direction. The product purpose of "Mark as manually exported" is a manual override for cases the integration did not handle automatically (auto-sync off, sync errored, CSV reconciliation, etc.) — so it must be available to admins regardless of sync state. The current gate hides it exactly when it is most needed: admin + sync OFF + admin is not the preferred exporter. The (isExporter && !syncEnabled) clause is correct as written — that is the delegated-exporter workflow, only meaningful when sync is off — and should remain.
What changes do you think we should make in order to solve the problem?
A single contained edit to isMarkAsExportedAction that (a) reorders so isReportFinished admits settled reports for the payer branch and (b) drops the && syncEnabled qualifier from the admin clause while preserving the delegated-exporter clause.
Behavior matrix after the fix (every other path is untouched):
User
Report state
sync ON
sync OFF
Admin payer, payments enabled
approved / closed / reimbursed
shows (payer branch — reimbursed was hidden)
shows (payer branch — reimbursed was hidden)
Admin, not payer, not preferred exporter
approved / closed / settled
shows (was already showing)
shows (was hidden)
Admin, is preferred exporter
finished
shows
shows
Non-admin preferred exporter
finished
hidden (unchanged)
shows (unchanged)
Non-admin, not exporter, not payer
any
hidden (unchanged)
hidden (unchanged)
Report not finished
—
hidden (unchanged)
hidden (unchanged)
No valid connected integration
—
hidden (early-return, unchanged)
hidden (unchanged)
The PR #59999 regression that drove 20e10b7fc4cc is not reintroduced: that bug was about the option disappearing after toggling sync ON. After this fix, isAdmin evaluates to true regardless of sync state, so the option is present in both halves of any sync-toggle cycle — i.e. PR #59999's symptom (option missing post-toggle) cannot reoccur.
What alternative solutions did you explore? (Optional)
return isAdmin || isExporter — drop the sync gate from both branches. Rejected — removes the role-separation intent the preferred-exporter role was designed to encode. A non-admin preferred exporter on a sync-ON connection has no reason to manually mark as exported (the integration flips the flag automatically); offering the option there is noise at best and a dual-write race at worst if the user clicks "Mark as manually exported" between sync ticks.
Patch only the payer branch (isReportClosedOrApproved || isSettled(report)). Rejected — fixes only the payer-settled case (the most easily-reproducible variant of the bug) but leaves the help-doc contract violated for the admin-with-sync-off scenario. The reporter explicitly compares against Classic, where it's an unconditional admin affordance.
Revert 20e10b7fc4cc to the pre-regression shape (return isAdmin || isExporter, gated by !isReportFinished || syncEnabled). Rejected — the || syncEnabled short-circuit hides the option for everyone whenever sync is on, which is the original bug PR Simplified Actions on Report Header and Preview V2 #59999's follow-up was supposed to fix. We need a fix that satisfies both the PR Simplified Actions on Report Header and Preview V2 #59999 case and the help-doc contract for admins.
Move the gate into useExportActions (always include MARK_AS_EXPORTED when an integration is connected). Rejected — bypasses the role/state gates that legitimately hide the option from non-admins, unfinished reports, and policies with no valid connection, and would also need to be re-implemented on the search bulk-actions surface (useSearchBulkActions callers of markAsManuallyExported). One contained util change covers every surface.
Please re-state the problem that we are trying to solve in this issue.
Workspace admins can open a final approved/paid expense report with a QBO accounting connection, but the NewDot export UI does not reliably offer the Classic behavior to mark the report as manually exported. The report can still expose the integration export path, so the menu appears to support QBO export while hiding the manual-export completion action.
What is the root cause of that problem?
The Mark as exported submenu option is gated by isMarkAsExportedAction(), but that helper does not use the same finished-report/admin eligibility as the integration export action.
For expense reports, isMarkAsExportedAction() first allows a payer only when payments are enabled and the report is closed or approved, then for finished reports returns only (isAdmin && syncEnabled) || (isExporter && !syncEnabled). That makes manual marking depend on the workspace auto-sync setting / preferred exporter split instead of simply allowing an admin or preferred exporter to mark a finished report as exported.
The rest of the code already supports this action. The same file's export option treats paid/reimbursed reports as finished and can expose the QBO export option:
There is also stale copy on the direct report export pickers: both ReportDetailsExportPage and ExportWithDropdownMenu render the manual-export option with workspace.common.markAsEntered even though the option value calls MARK_AS_EXPORTED.
What changes do you think we should make in order to solve the problem?
Update isMarkAsExportedAction() so the expense-report branch allows the same finished-report states that can be manually exported: approved, closed, or settled/reimbursed. After the finished-report check, allow workspace admins and preferred exporters to mark the report as exported without making the result depend on syncEnabled in opposite directions. Keep the existing invoice sender case intact.
Concretely, after confirming the report has a valid accounting connection, is an expense report, and is approved/closed/settled, return isAdmin || isPreferredExporter(policy, currentUserLogin) for the manual mark action. This aligns the visibility with the existing markAsManuallyExported() API path instead of hiding it behind the auto-sync/preferred-exporter split.
Also replace the stale workspace.common.markAsEntered labels with workspace.common.markAsExported in the two direct export pickers so every surface names the action consistently.
Platforms: web, desktop, native, and mWeb through shared report action/menu code.
Code paths / callers explicitly NOT touched: markAsManuallyExported() API parameters, backend MarkAsExported, CSV/template export, invoice sender eligibility.
API contracts or backend behavior changes: no.
What alternative solutions did you explore? (Optional)
I considered changing the MarkAsExported action itself, but the write path already builds optimistic report actions and calls WRITE_COMMANDS.MARK_AS_EXPORTED; the missing behavior is before that, in the UI eligibility gate.
I also considered changing only the label from "Mark as manually entered" to "Mark as exported", but that would not restore the missing More > Export submenu item when getSecondaryExportReportActions() filters out MARK_AS_EXPORTED. The label cleanup is still worth doing so the direct export picker does not disguise the action after it is visible.
changed the title [-]Unable to mark reports as manually exported to QBO in ND[/-][+][$250] Unable to mark reports as manually exported to QBO in ND[/+]on May 19, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@thesahindia The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
[-]Unable to mark reports as manually exported in ND[/-][+]Unable to mark reports as manually exported to QBO in ND[/+]godzillaxbox19982014-lgtm commentedon May 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Admins can open the export flow for an approved/paid expense report connected to QuickBooks Online, but they only see the option to export to QBO. They do not get the option to mark the report as manually exported.
What is the root cause of that problem?
The export menu is built from
getSecondaryExportReportActions()inReportSecondaryActionUtils.For expense reports,
isMarkAsExportedAction()currently allows the manual export option for:That misses the case from this issue: a workspace admin with a finished expense report and QBO connected, but auto-sync disabled / not treated as the preferred exporter. In that case
EXPORT_TO_INTEGRATIONcan still appear, butMARK_AS_EXPORTEDis filtered out.What changes do you think we should make in order to solve the problem?
I would update the expense-report branch of
isMarkAsExportedAction()so admins can mark a finished expense report as manually exported when there is a valid accounting connection, even if auto-sync is not enabled.The fix should stay narrow:
ReportSecondaryActionUtilsTestfor an approved QBO expense report where the current user is an admin, auto-sync is disabled, andMARK_AS_EXPORTEDis includedWhat alternative solutions did you explore? (Optional)
We could force admins to be the preferred exporter, but that does not match the expected behaviour from Classic/help docs. The smaller fix is to correct the permission check for the manual-export menu item only.
MelvinBot commentedon May 19, 2026
Proposal
What is the root cause of that problem?
The "Mark as exported" option is gated by
isMarkAsExportedAction, which has a gap in its payer path compared toisExportAction(the function that controls "Export to QBO").The payer path in
isExportAction(line 472) includes settled/reimbursed reports:But the payer path in
isMarkAsExportedAction(line 514) omitsisReportSettled:When a report is settled/reimbursed and the user is a payer with payments enabled, "Export to QBO" appears but "Mark as exported" does not — because the mark-as-exported payer path doesn't recognize settled reports. The function then falls through to the admin/exporter check (line 531), which requires either
syncEnabled(for admins) or being the preferred exporter (without sync). If neither condition is met, the option is hidden.What changes do you think we should make in order to solve the problem?
Add
isReportSettledto the payer path condition inisMarkAsExportedActionat line 514, aligning it withisExportAction:Change
isReportClosedOrApprovedto include settled reports, e.g.:This ensures settled/reimbursed reports get the "Mark as exported" option under the same conditions that already grant "Export to integration".
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.kamronbek04 commentedon May 19, 2026
Proposal
What is the root cause of that problem?
The Export submenu in the report's More menu is assembled by
useExportActions, which mapssecondaryExportActions(returned fromgetSecondaryExportReportActions) into the visible options. Each option only renders if its corresponding gate returns true. For the two options the bug is about — "Export to QB Online" and "Mark as manually exported" — those gates areisExportActionandisMarkAsExportedActioninsrc/libs/ReportSecondaryActionUtils.ts.Compare them side by side (ReportSecondaryActionUtils.ts#L443-L530):
isExportAction's payer branch (early-returns true):isMarkAsExportedAction's payer branch:isMarkAsExportedAction's payer branch is missingisReportSettled. So as soon as the report transitions toSTATUS_NUM.REIMBURSED, the payer (an admin who paid the report from a personal/workspace bank account) sees "Export to QB Online" but loses "Mark as manually exported" — exactly the screenshot in the bug.Then there's the non-payer admin branch, which is the more interesting parity gap:
isMarkAsExportedActionrequiressyncEnabledfor an admin — i.e., only show "Mark as manually exported" when the integration's auto-sync is turned on. That is the wrong direction. The product purpose of "Mark as exported" is to record that the report was handled outside the auto-sync pipeline (manual export, CSV pull, side-channel reconciliation). It is needed most when auto-sync is off; when auto-sync is on, the system itself flips the exported state. The gate is currently inverted relative to the user-facing contract documented in the help article — "admins have the ability to mark the report as manually exported once approved/paid", with no sync-state condition.The "Option available in Classic" line in the bug report points to the same observation: Classic shows this to admins whenever the report is in a finished state and there's a connected integration, regardless of auto-sync.
What changes do you think we should make in order to solve the problem?
Bring
isMarkAsExportedAction's gates back to parity withisExportAction, and remove the invertedsyncEnabledrequirement on the admin branch.src/libs/ReportSecondaryActionUtils.ts—isMarkAsExportedAction(L485-L530):const isReportPayer = isPayerUtils(currentAccountID, currentUserLogin, report, bankAccountList, policy, false); const arePaymentsEnabled = arePaymentsEnabledUtils(policy); const isReportApproved = isReportApprovedUtils({report}); const isReportClosed = isClosedReportUtils(report); - const isReportClosedOrApproved = isReportClosed || isReportApproved; + const isReportSettled = isSettled(report); + const isReportFinished = isReportClosed || isReportApproved || isReportSettled; - if (isReportPayer && arePaymentsEnabled && isReportClosedOrApproved) { + if (isReportPayer && arePaymentsEnabled && isReportFinished) { return true; } - const isReportReimbursed = isSettled(report); const connectedIntegration = getConnectedIntegration(policy); const syncEnabled = hasIntegrationAutoSync(policy, connectedIntegration); - const isReportFinished = isReportClosedOrApproved || isReportReimbursed; if (!isReportFinished) { return false; } const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN; - const isExporter = isPreferredExporter(policy, currentUserLogin); - return (isAdmin && syncEnabled) || (isExporter && !syncEnabled); + return isAdmin || isExporter;Two changes, one cause:
isReportSettledto the payer branch so the payer admin keeps the option after the report is reimbursed — matchesisExportAction's payer branch.syncEnabledqualifiers on the admin/exporter branch. Admin or preferred exporter, finished report, connected integration → show the option. This matches the Classic behavior cited in the help article and matches the intent of "Mark as exported": a manual override for cases where the system did not export automatically.exportSubmenuOptions[MARK_AS_EXPORTED]already exists inuseExportActions.tsand is wired tomarkAsManuallyExported— no UI plumbing or new strings are needed. The fix is contained to one util function.Why this over alternatives:
useExportActionsto always includeMARK_AS_EXPORTEDwhenever an integration is connected. Rejected — pushes UX policy into the hook and bypasses the role/state gates that legitimately hide the option from non-admins or unfinished reports.syncEnabledgate but invert it (!syncEnabled). Rejected — would hide the option when auto-sync is on, even for admins who needed a manual override after a failed/partial sync. Classic shows it regardless; matching that is the documented contract.Regression watch: confirm non-admin / non-exporter users on the same workspace still don't see "Mark as manually exported" (the role gate remains). Confirm the option still hides when the report is still processing (still gated by
isReportFinished). Confirm the gate still hides when the policy has no valid connected integration (hasAccountingConnectionearly-return is untouched). ConfirmmarkAsManuallyExportedaction's optimistic + API path is exercised — it's already used fromuseExportActions.tsand the search bulk-actions hook, so no action-side changes are needed.Verify: policy with QBO connection, auto-sync ON, admin user, report fully approved → More → Export → both "Export to QB Online" and "Mark as manually exported" should appear (today only the first shows). Repeat with auto-sync OFF — both should still appear for admin. Repeat with non-admin non-exporter — neither should appear. Repeat with the payer of a reimbursed report (status
REIMBURSED) — both should appear (today "Mark as manually exported" disappears at reimbursement).What alternative solutions did you explore? (Optional)
Inverting only the admin branch (
(isAdmin && !syncEnabled) || (isExporter && !syncEnabled)). Rejected — when auto-sync is on but the integration is temporarily broken (token expired, QBO rate-limit), admins legitimately need the manual-export override to clear the report's exported state. Hiding it whenever sync is "on" still leaves admins blocked on real-world failure modes that's what the option exists for.Surfacing "Mark as manually exported" only from the post-export "Export Again" confirmation modal (
useExportAgainModal). Rejected — the help article and the Classic UX both put this in the primary Export submenu, not behind a re-export confirmation. The bug reporter explicitly compares to Classic, where it's a first-class menu entry.yusufdeveloper2903 commentedon May 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
An admin opens an approved expense report on a workspace connected to QBO and goes to More → Export. They see Export to QB Online but not Mark as manually exported. Per the help article and the Classic UI, admins must have the manual-export option once the report is approved/paid.
What is the root cause of that problem?
The Export submenu pulls
MARK_AS_EXPORTEDfromgetSecondaryExportReportActions, which gates the option onisMarkAsExportedActionatApp/src/libs/ReportSecondaryActionUtils.ts
Lines 485 to 532 in 1fc7d1d
1. Payer branch rejects the
REIMBURSEDstatus.The payer branch at
App/src/libs/ReportSecondaryActionUtils.ts
Line 514 in 1fc7d1d
isReportClosedOrApproved:The parallel branch in
isExportActionatApp/src/libs/ReportSecondaryActionUtils.ts
Line 472 in 1fc7d1d
So once an admin pays themselves and the report transitions to
STATUS_NUM.REIMBURSED, Export to QBO still shows but Mark as manually exported drops out of the payer branch and falls through to the admin/exporter branch — which is broken by flaw 2.2. Admin branch is inverted on
syncEnabled— regression from a follow-up to PR #59999.The function was bootstrapped in
ad51938cd166with the shapereturn isAdmin || isExporter, gated by!isReportFinished || syncEnabled. A follow-up commit20e10b7fc4cc(fix 59999#issuecomment-2815226410, Apr 22 2025) split the gate to fix a different bug (PR #59999 — "Mark as exported" reappearing after a sync-toggle cycle), landing the current shape atApp/src/libs/ReportSecondaryActionUtils.ts
Line 531 in 1fc7d1d
For admins, that AND-clause is the wrong direction. The product purpose of "Mark as manually exported" is a manual override for cases the integration did not handle automatically (auto-sync off, sync errored, CSV reconciliation, etc.) — so it must be available to admins regardless of sync state. The current gate hides it exactly when it is most needed: admin + sync OFF + admin is not the preferred exporter. The
(isExporter && !syncEnabled)clause is correct as written — that is the delegated-exporter workflow, only meaningful when sync is off — and should remain.What changes do you think we should make in order to solve the problem?
A single contained edit to
isMarkAsExportedActionthat (a) reorders soisReportFinishedadmits settled reports for the payer branch and (b) drops the&& syncEnabledqualifier from the admin clause while preserving the delegated-exporter clause.Behavior matrix after the fix (every other path is untouched):
The PR #59999 regression that drove
20e10b7fc4ccis not reintroduced: that bug was about the option disappearing after toggling sync ON. After this fix,isAdminevaluates totrueregardless of sync state, so the option is present in both halves of any sync-toggle cycle — i.e. PR #59999's symptom (option missing post-toggle) cannot reoccur.What alternative solutions did you explore? (Optional)
return isAdmin || isExporter— drop the sync gate from both branches. Rejected — removes the role-separation intent the preferred-exporter role was designed to encode. A non-admin preferred exporter on a sync-ON connection has no reason to manually mark as exported (the integration flips the flag automatically); offering the option there is noise at best and a dual-write race at worst if the user clicks "Mark as manually exported" between sync ticks.Patch only the payer branch (
isReportClosedOrApproved || isSettled(report)). Rejected — fixes only the payer-settled case (the most easily-reproducible variant of the bug) but leaves the help-doc contract violated for the admin-with-sync-off scenario. The reporter explicitly compares against Classic, where it's an unconditional admin affordance.Revert
20e10b7fc4ccto the pre-regression shape (return isAdmin || isExporter, gated by!isReportFinished || syncEnabled). Rejected — the|| syncEnabledshort-circuit hides the option for everyone whenever sync is on, which is the original bug PR Simplified Actions on Report Header and Preview V2 #59999's follow-up was supposed to fix. We need a fix that satisfies both the PR Simplified Actions on Report Header and Preview V2 #59999 case and the help-doc contract for admins.Move the gate into
useExportActions(always includeMARK_AS_EXPORTEDwhen an integration is connected). Rejected — bypasses the role/state gates that legitimately hide the option from non-admins, unfinished reports, and policies with no valid connection, and would also need to be re-implemented on the search bulk-actions surface (useSearchBulkActionscallers ofmarkAsManuallyExported). One contained util change covers every surface.melvin-bot commentedon May 19, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)KJ21-ENG commentedon May 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace admins can open a final approved/paid expense report with a QBO accounting connection, but the NewDot export UI does not reliably offer the Classic behavior to mark the report as manually exported. The report can still expose the integration export path, so the menu appears to support QBO export while hiding the manual-export completion action.
What is the root cause of that problem?
The
Mark as exportedsubmenu option is gated byisMarkAsExportedAction(), but that helper does not use the same finished-report/admin eligibility as the integration export action.App/src/libs/ReportSecondaryActionUtils.ts
Lines 484 to 530 in eaaffe3
For expense reports,
isMarkAsExportedAction()first allows a payer only when payments are enabled and the report is closed or approved, then for finished reports returns only(isAdmin && syncEnabled) || (isExporter && !syncEnabled). That makes manual marking depend on the workspace auto-sync setting / preferred exporter split instead of simply allowing an admin or preferred exporter to mark a finished report as exported.The rest of the code already supports this action. The same file's export option treats paid/reimbursed reports as finished and can expose the QBO export option:
App/src/libs/ReportSecondaryActionUtils.ts
Lines 442 to 481 in eaaffe3
And the actual manual-export write path already exists through
markAsManuallyExported()/WRITE_COMMANDS.MARK_AS_EXPORTED:App/src/hooks/useExportActions.ts
Lines 187 to 203 in eaaffe3
There is also stale copy on the direct report export pickers: both
ReportDetailsExportPageandExportWithDropdownMenurender the manual-export option withworkspace.common.markAsEnteredeven though the option value callsMARK_AS_EXPORTED.App/src/pages/inbox/report/ReportDetailsExportPage.tsx
Lines 89 to 99 in eaaffe3
App/src/components/ReportActionItem/ExportWithDropdownMenu.tsx
Lines 76 to 79 in eaaffe3
What changes do you think we should make in order to solve the problem?
Update
isMarkAsExportedAction()so the expense-report branch allows the same finished-report states that can be manually exported: approved, closed, or settled/reimbursed. After the finished-report check, allow workspace admins and preferred exporters to mark the report as exported without making the result depend onsyncEnabledin opposite directions. Keep the existing invoice sender case intact.Concretely, after confirming the report has a valid accounting connection, is an expense report, and is approved/closed/settled, return
isAdmin || isPreferredExporter(policy, currentUserLogin)for the manual mark action. This aligns the visibility with the existingmarkAsManuallyExported()API path instead of hiding it behind the auto-sync/preferred-exporter split.Also replace the stale
workspace.common.markAsEnteredlabels withworkspace.common.markAsExportedin the two direct export pickers so every surface names the action consistently.Scope boundaries:
src/libs/ReportSecondaryActionUtils.ts—isMarkAsExportedAction()(lines 484-530);src/pages/inbox/report/ReportDetailsExportPage.tsx—exportSelectorOptionsmanual-export row (lines 89-99);src/components/ReportActionItem/ExportWithDropdownMenu.tsx—dropdownOptionsmanual-export row (lines 76-79).markAsManuallyExported()API parameters, backendMarkAsExported, CSV/template export, invoice sender eligibility.What alternative solutions did you explore? (Optional)
I considered changing the
MarkAsExportedaction itself, but the write path already builds optimistic report actions and callsWRITE_COMMANDS.MARK_AS_EXPORTED; the missing behavior is before that, in the UI eligibility gate.I also considered changing only the label from "Mark as manually entered" to "Mark as exported", but that would not restore the missing More > Export submenu item when
getSecondaryExportReportActions()filters outMARK_AS_EXPORTED. The label cleanup is still worth doing so the direct export picker does not disguise the action after it is visible.[-]Unable to mark reports as manually exported to QBO in ND[/-][+][$250] Unable to mark reports as manually exported to QBO in ND[/+]melvin-bot commentedon May 19, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022056741403746227070
45 remaining items
melvin-bot commentedon Jun 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-24. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 17, 2026
@thesahindia The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jun 22, 2026
@thesahindia Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Jun 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 23, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Jun 25, 2026
Payment Summary
Contributor: @emkhalid paid $250 via Upwork
Contributor+: @thesahindia due $250 via NewDot
@emkhalid can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022056741403746227070
@thesahindia plz complete the BZ checklist and tag me in a post once you have. Thx
emkhalid commentedon Jun 25, 2026
@mallenexpensify I accepted the offer, thanks
thesahindia commentedon Jun 26, 2026
Just need to add the test case
Precondition:
Create a workspace with a QBO (or other accounting) connection
Turn auto-sync OFF on the connection
Log in as a workspace admin
Steps:
cc: @mallenexpensify
mallenexpensify commentedon Jun 26, 2026
@emkhalid paid, summary updated above. Thx.
^ Test case created. Thx
garrettmknight commentedon Aug 7, 2026
$250 approved for @thesahindia