Revert "follow-up: Start & End date does not matches Title format with Trip-based Auto-reporting"#86918
Conversation
…h Trip-based Auto-reporting"
|
🚧 @jasperhuangg has triggered a test Expensify/App build. You can view the workflow run here. |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc82257d36
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const computedName = computeOptimisticReportName(iouReport, policy, iouReport.policyID, transactionsRecord); | ||
| return computedName ?? undefined; | ||
| return populateOptimisticReportFormula(titleFormula, iouReport as Parameters<typeof populateOptimisticReportFormula>[1], policy); |
There was a problem hiding this comment.
Restore full formula evaluation for report-name recompute
recalculateOptimisticReportName() now calls populateOptimisticReportFormula(), which only replaces a limited hardcoded token set and drops other {report:*} expressions, so title formulas that previously worked via computeOptimisticReportName() (for example auto-reporting/date-range formulas) will be flattened or partially emptied when an expense is added/edited. This makes optimistic report names diverge from the policy formula behavior and from the initial name computed at report creation time.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| const {startDate, endDate} = getAutoReportingDates(policy, report, new Date(), context); | ||
| const {startDate, endDate} = getAutoReportingDates(policy, report); |
There was a problem hiding this comment.
Pass formula context into auto-reporting date calculation
computeAutoReportingInfo() stopped forwarding FormulaContext into getAutoReportingDates(), so trip auto-reporting dates can no longer see optimistic/context transactions during expense creation and edit flows. In practice, {report:autoreporting:start|end} may be computed from stale Onyx data (or current time fallbacks) until sync completes, which reintroduces incorrect optimistic titles/date ranges for trip-based reports.
Useful? React with 👍 / 👎.
This comment has been minimized.
This comment has been minimized.
|
@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Straight revert |
|
🚧 @arosiclair 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…reporting-frequency Revert "follow-up: Start & End date does not matches Title format with Trip-based Auto-reporting" (cherry picked from commit fb48fbe) (cherry-picked to staging by arosiclair)
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.3.51-9 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. I reviewed all help site articles under What this PR does: Reverts PR #74570, which was a code-level bug fix for how Help site articles checked:
Why no changes are needed:
|
Reverts #74570
$ #86839