follow-up: Start & End date does not matches Title format with Trip-based Auto-reporting#74570
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Regression fix, removing myself and unsubscribing |
|
Hi @TaduJR. Can you please complete the checklist and add the missing videos? With your test steps, I see the start and end date as 3 Nov to 7 Nov which seems to be not correct?
|
4b44137 to
e2cd622
Compare
Sure, Added for MacOS
I think that is a BE bug, if occurred. Have you tried offline? |
|
@TaduJR We require screen recordings for all of the platforms. Please add for all. |
|
Hello @allroundexperts Added the Demos for all platforms. Also the backend needs a fix for Trip Auto Reports. As you can see on the demo it is not working on the Custom Report Title Expense Report. cc @Valforte |
@Valforte can you please check this? |
|
Friendly Bump @Valforte on this one. |
|
Also @allroundexperts if FE LGTY, Can we have a checklist and approval, Please? Thank you! |
…uto-reporting-frequency
@mananjadhav Thanks for the bump! Did you try offline? The BE still need a fix. |
|
I think we shouldn't be just fixing it for optimistic scenario then, we should also fix the BE first. |
|
Bumped @Valforte on Slack. |
|
Chatted with @TaduJR on Slack, I'll have the BE fix up soon |
|
Waiting for an update on the BE PR. |
…uto-reporting-frequency
…for trip date range
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb-optimistic-report-formula.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @Valforte 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.3.51-0 🚀
Bundle Size Analysis (Sentry): |
|
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here). Failure details: https://github.com/Expensify/Expensify/actions/runs/23816853812 |
|
Deploy Blocker #86839 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.51-10 🚀
|







Explanation of Change
Trip-based auto-reporting dates (
{report:autoreporting:start/end}) showed today's date instead of actual transaction dates during offline/optimistic flows. Three root causes were found and fixed:1.
getAutoReportingDatesdidn't passFormulaContextto transaction date helpers (Formula.ts)computeAutoReportingInfohad the full context but never forwarded it togetAutoReportingDates, sogetOldestTransactionDate/getNewestTransactionDatecouldn't see optimistic transactions. Also fixed the TRIP end date to usegetNewestTransactionDateinstead ofcurrentDate.2.
getAllReportTransactionsWithContextignoredcontext.allTransactions(Formula.ts)computeOptimisticReportNamepasses transactions viaFormulaContext.allTransactions, but this function only readcontext.transaction(singular). During optimistic updates the new transactions aren't in Onyx yet, so they were invisible to date calculations.3.
maybeUpdateReportNameForFormulaTitleblocked on missing backend data and used wrong formula engine (IOU/index.ts)reportNameValuePairs(backend-only, unavailable for optimistic reports) instead of falling back topolicy.fieldList.populateOptimisticReportFormula(regex replacer that strips{report:autoreporting:*}) instead ofcomputeOptimisticReportName(full Formula engine).Fixed Issues
$ #74268
PROPOSAL:
Tests
SSetNameValuePair('useCustomReportNamesNewExpensify', 'true');g_account.nameValuePairs.useCustomReportNamesNewExpensify;returns'true'Trip from {report:autoreporting:start:MMM dd} to {report:autoreporting:end:MMM dd, yyyy}yyyy-MM-dd,MM/dd/yyyy) that both start and end dates reflect the transaction date rangeExpected Result:
Start date shows the oldest transaction date
End date shows the newest transaction date (NOT the current system date)
Date formats are applied correctly to both dates
Verify that no errors appear in the JS console
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
output.mp4
MacOS: Desktop
Mac-Desktop-3.mp4