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
Accounting - "Export to Sage Intacct" button only appears if the expense is opened #59801
Version Number: 9.1.24-2 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:#59718 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Apple iPhone 12 Pro / Safari, Samsung Galaxy A52s 5G / Android 14 App Component: Other
Action Performed:
Precondition: Use a Gmail account that has at least one manual expense created, paid "Elsewhere", and connected to Sage Intacct after the creation of that expense.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
if needed we can test getReportPreviewAction returns export action without passing the expense report but providing the appropriate report preview parent action
What alternative solutions did you explore? (Optional)
This seems intentional to me and is similar to how it works now. You don't want a barrage of unexported expenses prompting export, some people use Expensify for years before connecting an accounting system - it would be awful if you suddenly had 5 years worth of expenses prompting an export despite not being interacted with.
@mountiny what do you think the expected behaviour should be here?
Ahhh that's a good point. I see what Rachael is saying. I think the real solution for that is eventually add a mark as exported and bulk option to do the same. In fact, I'm pretty certain this already exists, though in any case, I think we can probably just close this issue.
Activity
melvin-bot commentedon Apr 8, 2025
Triggered auto assignment to @RachCHopkins (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.FitseTLT commentedon Apr 8, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-08 22:13:17 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Accounting - "Export to Sage Intacct" button only appears if the expense is opened
What is the root cause of that problem?
The canExport function we use to show the button here needs the expense report to calculate
App/src/libs/ReportPreviewActionUtils.ts
Lines 62 to 75 in 8648481
but just after signing in or clearing cache the expense report will not be available until we open the expense report.
What changes do you think we should make in order to solve the problem?
We can use the report preview childStatus to calculate as a fallback
Then we need to update
getReportPreviewActionto pass the action paramThen pass the report preview action
App/src/components/ReportActionItem/ReportPreview.tsx
Line 503 in 8648481
Update this
then pass action as a second param where needed as in here
And additionally we need to give the preview action childReportID as a fallback here
App/src/components/ReportActionItem/ExportWithDropdownMenu.tsx
Line 46 in 7f80b75
we will pass the report preview action as a prop to ExportWithDropdownMenu here
BTW we will need the same fix applied for MoneyRequestReportPreviewContent too.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
if needed we can test getReportPreviewAction returns export action without passing the expense report but providing the appropriate report preview parent action
What alternative solutions did you explore? (Optional)
RachCHopkins commentedon Apr 11, 2025
This seems intentional to me and is similar to how it works now. You don't want a barrage of unexported expenses prompting export, some people use Expensify for years before connecting an accounting system - it would be awful if you suddenly had 5 years worth of expenses prompting an export despite not being interacted with.
@mountiny what do you think the expected behaviour should be here?
mountiny commentedon Apr 11, 2025
Ah I dont have that much knowledge about this I will ask Jason
JmillsExpensify commentedon Apr 11, 2025
Ahhh that's a good point. I see what Rachael is saying. I think the real solution for that is eventually add a
mark as exportedand bulk option to do the same. In fact, I'm pretty certain this already exists, though in any case, I think we can probably just close this issue.