Skip to content

[CP Staging] Revert "Align export condition with BE check" - #82844

Merged
mountiny merged 1 commit into
mainfrom
revert-81445-export-condition-rejected-to-submitter
Feb 18, 2026
Merged

mountiny merged 1 commit into
mainfrom
revert-81445-export-condition-rejected-to-submitter

Conversation

@cristipaval

@cristipaval cristipaval commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Reverts #81445.

This PR introduced a regression causing "You rejected this report" to appear in the expense report after an admin retracts and reopens a report (see #82744).

Fixed Issues

$ #82744

…ndition2"

This reverts commit 8b7d321, reversing
changes made to 13da2f9.
@cristipaval
cristipaval requested review from a team as code owners February 18, 2026 17:45
@melvin-bot
melvin-bot Bot requested review from heyjennahay and linhvovan29546 and removed request for a team February 18, 2026 17:45
@melvin-bot

melvin-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

@linhvovan29546 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@cristipaval
cristipaval requested review from mountiny and removed request for linhvovan29546 February 18, 2026 17:46
@cristipaval cristipaval changed the title Revert "Align export condition with BE check" [CP Staging] Revert "Align export condition with BE check" Feb 18, 2026
@cristipaval cristipaval added the CP Staging marks PRs that have been CP'd to staging label Feb 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a689fd3bd0

ℹ️ 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".

Comment thread src/libs/ReportUtils.ts
Comment on lines +12254 to +12257
// We need to make sure that there was at least one successful export to consider the report exported.
// We add one EXPORT_INTEGRATION action to the report when we start exporting it (with pendingAction: 'add') and then another EXPORT_INTEGRATION when the export finishes successfully.
// If the export fails, we add an INTEGRATIONS_MESSAGE action to the report, but the initial EXPORT_INTEGRATION action is still present, so we compare the counts of these two actions to determine if the report was exported successfully.
return exportIntegrationActionsCount > integrationMessageActionsCount;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reset export state when approval cycle restarts

This logic now marks a report as exported solely from action counts, so a previously exported report stays exported after RETRACTED/REOPENED/UNAPPROVED transitions because the historical EXPORT_INTEGRATION actions still outnumber integration errors. In that state, downstream checks that call isExported() continue to hide/alter export-related actions even though the backend has reset the approval/export cycle, so users can be forced into an unnecessary “export again” flow or blocked from expected actions after reopening a report.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Feb 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 87.39% <ø> (+6.72%) ⬆️
src/libs/ReportPrimaryActionUtils.ts 91.74% <100.00%> (+15.59%) ⬆️
src/libs/ReportSecondaryActionUtils.ts 92.39% <100.00%> (ø)
src/components/MoneyReportHeader.tsx 0.00% <0.00%> (ø)
...onents/ReportActionItem/ExportWithDropdownMenu.tsx 0.00% <0.00%> (ø)
src/libs/ReportUtils.ts 74.97% <70.00%> (+0.39%) ⬆️
... and 90 files with indirect coverage changes

@mountiny mountiny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straight revert

@mountiny
mountiny merged commit 481f81c into main Feb 18, 2026
32 of 37 checks passed
@mountiny
mountiny deleted the revert-81445-export-condition-rejected-to-submitter branch February 18, 2026 19:43
@melvin-bot

melvin-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@mountiny

Copy link
Copy Markdown
Contributor

Straight revert

OSBotify pushed a commit that referenced this pull request Feb 18, 2026
…n-rejected-to-submitter

(cherry picked from commit 481f81c)

(cherry-picked to staging by mountiny)
@OSBotify OSBotify mentioned this pull request Feb 18, 2026
93 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.21-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.21-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.22-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀

platform result
🕸 web 🕸 cancelled 🔪
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀

platform result
🕸 web 🕸 failure ❌
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants