-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix export condition #61260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix export condition #61260
Conversation
@suneox let's prioritize review on this one! Hopefully we can get through these small bugs fast. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does work, but I think that this solution also works (i had a sudden realization a moment ago 💀 ), without changing anything in reportUtils.ts file:
from line 173
const connectedIntegration = getConnectedIntegration(policy);
const syncEnabled = hasIntegrationAutoSync(policy, connectedIntegration);
const reportActions = getAllReportActions(report.reportID);
const isExported = isExportedUtil(reportActions);
if (syncEnabled && !isExported) {
return false;
}
I think this solution is a bit more elegant as we don't operate on actions directly and instead we use function intended for this that does this job for us :)
we still need to get reportActions but instead of checking all actions by hand we can just check whether the report was not exported |
Screen.Recording.2025-05-01.at.23.49.36.movvideo showing it works with that implementation :) |
Hmm but in that case we still show the |
I updated the PR with your suggestion, but I think there's some missing cases since I'm seeing some odd behavior now. I'll get back to this on Monday |
I will start checking now |
@suneox ok, I think I figured out the logic for exported reports. I updated the PR accordingly. Here's the result:
Screen.Recording.2025-05-07.at.12.52.27.AM.mov
Screen.Recording.2025-05-07.at.12.54.31.AM.mov
Screen.Recording.2025-05-07.at.12.55.39.AM.mov |
This PR also fixed #60914. |
@suneox @borys3kk this is ready for review again. FYI I'm adding a hardcoded value of |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-05-07.at.20.03.48.mp4Android: mWeb ChromeScreen.Recording.2025-05-07.at.19.47.19.mp4iOS: HybridAppScreen.Recording.2025-05-07.at.19.40.44.mp4iOS: mWeb SafariScreen.Recording.2025-05-07.at.19.44.26.mp4MacOS: Chrome / SafariScreen.Recording.2025-05-07.at.19.28.00.mp4MacOS: DesktopScreen.Recording.2025-05-07.at.19.28.00.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@MarioExpensify 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.1.42-0 🚀
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.1.43-5 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.44-8 🚀
|
Explanation of Change
Updates the logic to show the
Export
primary action based on if the auto export has failed or if the user has manually marked the report as exportedFixed Issues
$ #61092
$ #60914
Tests
Pre-requisite: a workspace connected to an accounting system AND auto sync is enabled
Export
primary action because the report is queued to auto-exportExport
primary button is shownMore
and manually export the expenseExport
button is not shownOffline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Screen.Recording.2025-05-07.at.12.52.27.AM.mov
Screen.Recording.2025-05-07.at.12.54.31.AM.mov
Screen.Recording.2025-05-07.at.12.55.39.AM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop