Skip to content

Revert "follow-up: Start & End date does not matches Title format with Trip-based Auto-reporting"#86918

Merged
arosiclair merged 1 commit intomainfrom
revert-74570-feat-ORTF-Auto-reporting-frequency
Apr 2, 2026
Merged

Revert "follow-up: Start & End date does not matches Title format with Trip-based Auto-reporting"#86918
arosiclair merged 1 commit intomainfrom
revert-74570-feat-ORTF-Auto-reporting-frequency

Conversation

@jasperhuangg
Copy link
Copy Markdown
Contributor

@jasperhuangg jasperhuangg commented Apr 1, 2026

Reverts #74570

$ #86839

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🚧 @jasperhuangg has triggered a test Expensify/App build. You can view the workflow run here.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

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.

Files with missing lines Coverage Δ
src/libs/Formula.ts 87.81% <100.00%> (-1.16%) ⬇️
src/libs/actions/IOU/index.ts 75.41% <50.00%> (+0.21%) ⬆️
... and 11 files with indirect coverage changes

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@github-actions

This comment has been minimized.

@arosiclair arosiclair merged commit fb48fbe into main Apr 2, 2026
37 of 40 checks passed
@arosiclair arosiclair deleted the revert-74570-feat-ORTF-Auto-reporting-frequency branch April 2, 2026 13:12
@melvin-bot melvin-bot bot added the Emergency label Apr 2, 2026
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Apr 2, 2026

@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@arosiclair
Copy link
Copy Markdown
Contributor

Straight revert

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🚧 @arosiclair has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented Apr 2, 2026

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

OSBotify pushed a commit that referenced this pull request Apr 2, 2026
…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)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Apr 2, 2026
@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented Apr 2, 2026

🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.3.51-9 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@MelvinBot
Copy link
Copy Markdown
Contributor

No help site changes are required for this PR.

I reviewed all help site articles under App/docs/articles/ for references to trip-based auto-reporting, auto-reporting formulas, and report title formulas. Here's the summary:

What this PR does: Reverts PR #74570, which was a code-level bug fix for how {report:autoreporting:start} and {report:autoreporting:end} formula values were computed during offline/optimistic flows in Formula.ts and IOU/index.ts.

Help site articles checked:

  • new-expensify/reports-and-expenses/Customize-and-Enforce-Report-Titles.md — Does not reference {report:autoreporting:start/end} formulas at all
  • expensify-classic/reports/Set-Custom-Report-Names.md — Does not reference these formulas either
  • expensify-classic/spending-insights/Export-Expenses-And-Reports.md — References {report:autoReporting:start} and {report:autoReporting:end} but only describes them at a conceptual level ("start/end date of the automatic reporting cycle"), which is unaffected by this revert

Why no changes are needed:

  • The revert undoes an internal bug fix — it doesn't add, remove, or rename any formulas
  • No UI labels, settings names, navigation paths, or feature descriptions are changed
  • The documented purpose and syntax of all formulas remains accurate
  • No new features were introduced or removed that would need documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging Ready To Build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants