Skip to content

[CP Staging] Revert #79294 - Fix report title not updating when reimbursable expense is changed offline#80051

Merged
Julesssss merged 1 commit into
mainfrom
jules-revert79294
Jan 21, 2026
Merged

[CP Staging] Revert #79294 - Fix report title not updating when reimbursable expense is changed offline#80051
Julesssss merged 1 commit into
mainfrom
jules-revert79294

Conversation

@Julesssss

@Julesssss Julesssss commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

This reverts PR #79294 which was merged on Jan 20, 2026.

Original PR: #79294
Merge commit: 9a6b28d

Test steps to validate fix:

Precondition

  • Tags are enabled and there is at least one tag in a workspace
  • Navigate to staging.new.expensify.com
  • Navigate to a workspace chat
  • Create a new report and add two expenses to the report
  • Change the report name to anything
  • Open one of the expenses > Click on the tag field > Select any tag
  • Observe the report field

Expected Result:

  • The title should not be changed

…ursable-report-title-not-updating"

This reverts commit 9a6b28d, reversing
changes made to b6b66f6.
@Julesssss Julesssss requested review from a team as code owners January 21, 2026 00:18
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and MonilBhavsar and removed request for a team January 21, 2026 00:18
@melvin-bot

melvin-bot Bot commented Jan 21, 2026

Copy link
Copy Markdown

@MonilBhavsar 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]

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #80051.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://80051.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

App/src/libs/ReportUtils.ts

Lines 6716 to 6719 in 5d88ce7

.replaceAll(/\{report:status\}/gi, report.statusNum !== undefined ? getHumanReadableStatus(report.statusNum) : '')
.replaceAll(/\{user:email\}/gi, currentUserEmail ?? '')
.replaceAll(/\{user:email\|frontPart\}/gi, (currentUserEmail ? currentUserEmail.split('@').at(0) : '') ?? '')
.replaceAll(/\{report:(.+)\}/gi, '');

P2 Badge Restore {report:reimbursable} token substitution

Because the dedicated {report:reimbursable} replacement was removed, the catch‑all replacement here will strip that token entirely, so any custom report title formulas that include {report:reimbursable} render a blank value in optimistic titles (e.g., when converting/creating expense reports before the server response). This regresses documented behavior and makes report titles lose reimbursable amounts until the server overwrites them.


if (!Number.isNaN(iouReport.total) && iouReport.total !== undefined) {
// Use newReportTotal in scenarios where the total is based on more than just the current transaction, and we need to override it manually
if (newReportTotal) {
iouReport.total = newReportTotal;
} else {

P2 Badge Recompute reportName after optimistic total updates

This block updates the report totals and non‑reimbursable totals, but the report name is no longer recalculated afterward. When a policy uses a custom title formula (e.g., {report:total} or {report:reimbursable}), editing an expense amount or changing reimbursable status offline will leave the report title stale even though totals are updated optimistically.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Julesssss

Copy link
Copy Markdown
Contributor Author

Skipping checks, simple revert

@Julesssss Julesssss merged commit c003a54 into main Jan 21, 2026
31 of 37 checks passed
@Julesssss Julesssss deleted the jules-revert79294 branch January 21, 2026 17:07
@melvin-bot

melvin-bot Bot commented Jan 21, 2026

Copy link
Copy Markdown

@Julesssss 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.

@melvin-bot melvin-bot Bot added the Emergency label Jan 21, 2026
OSBotify pushed a commit that referenced this pull request Jan 21, 2026
Revert #79294 - Fix report title not updating when reimbursable expense is changed offline

(cherry picked from commit c003a54)

(cherry-picked to staging by Julesssss)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jan 21, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

✋ 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

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.5-4 🚀

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

@Beamanator Beamanator changed the title Revert #79294 - Fix report title not updating when reimbursable expense is changed offline [CP Staging] Revert #79294 - Fix report title not updating when reimbursable expense is changed offline Jan 21, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.5-7 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.6-0 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.6-4 🚀

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants