[CP Staging] Revert "Align export condition with BE check" - #82844
Conversation
|
@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] |
There was a problem hiding this comment.
💡 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".
| // 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; |
There was a problem hiding this comment.
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 Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Straight revert |
…n-rejected-to-submitter (cherry picked from commit 481f81c) (cherry-picked to staging by mountiny)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.21-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.21-4 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
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