[$250] Report - Report title not updating consistently for expenses created before default title set
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.2.55-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1950/folder/15397164/57245516/1010741310 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: Money Requests
Action Performed:
- Go to https://staging.new.expensify.com/home
- Open workpace chat
- Enable forced offline
- Create an expense
- Submit and approve
- Go to reports
- Change default report title as {report:type} {report:status}
- Go to workspace chat
- Create an an expense
- Submit and approve the expense
- Note the title header of expense created in step 4 and step 9
- Turn off forced offline
- Note the title header of expense created in step 4 and step 9
- Create a new workspace
- Add a manual expense
- Submit and approve the expense
- Go to reports
- Change default report title as {report:type} {report:status} 19.Go to workspace chat
- Create an an expense
- Submit and approve the expense
- Note the title header of expense created in step 4 and step 9
Expected Result:
Report name must not change to the report ID, the status must update correctly.
Actual Result:
Report name changes to the report ID, the status does not updated correctly.
Workaround:
Unknown
Platforms:
- [x] Android: App
- [x] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/faf65d18-41d0-4603-a646-728ebbdfd231
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021988963107730630971
- Upwork Job ID: 1988963107730630971
- Last Price Increase: 2025-12-25
Issue Owner
Current Issue Owner: @jjcoffee
Triggered auto assignment to @garrettmknight (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.
Job added to Upwork: https://www.upwork.com/jobs/~021988963107730630971
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
No proposals yet, Melv.
@garrettmknight @jjcoffee this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Posted on Slack to get some eyes on this.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick!
@garrettmknight Still no proposals on this, should we maybe ask for a retest?
@garrettmknight i am working on it. soon give a proposal today
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick!
Still no proposals.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
I will post a proposal by tomorrow EOD
Proposal:
Please re-state the problem that we are trying to solve in this issue.
Expense old reports sometimes display the report ID as the title, and their status does not update correctly. This happens when the report name cannot be computed from the policy formula or is empty.
What is the root cause of that problem?
When the report title fails to compute based on the policy formula (due to missing, invalid, or incomplete data), the logic falls back to using the report ID as the title. This fallback occurs for both new and old reports, resulting in confusing and inconsistent report names for users. The failure to compute a proper title is not handled gracefully, so the report ID is shown instead of a meaningful name.
What changes do you think we should make in order to solve the problem?
- Always attempt to generate the report title dynamically using the current policy formula for all reports—specifically for reports whose status is not "Approved" or higher. Implemented
(Function:
createExpenseReportTitleFromPolicyFormula) - Update the UI to use a utility function that computes the title from the formula and report/policy data, ensuring a meaningful name is always displayed.
(Files changed: MoneyReportHeader, HeaderWithBackButton, AvatarWithDisplayName, MoneyRequestReportPreviewContent, ReportScreen; Function:createExpenseReportTitleFromPolicyFormula) - Standardize status mapping using a single utility that translates state and status numbers to the correct localized string. Added new statusNum "open" and use it instead of "draft" status.
(Files changed: ReportNameUtils, CONST, SearchUIUtils, language files; Function: ImplementedgetReportStatus) - Ensure all translation keys (e.g., "open") exist in all language files.
What alternative solutions did you explore? (Optional)
- Migrating all old reports in the database to have the new title format (more complex, less flexible).
- Only updating titles for new reports (does not solve the problem for existing reports).
@garrettmknight @jjcoffee I have fixed the issue in my local and tested . It is working perfectly. Please arrange a review .
@jjcoffee my proposal will be review? will it be reviewed first?
@jjcoffee I am a first-time contributor and 2 days before submitted a proposal for this issue Just wanted to check if any clarification is needed from my side. Thanks! Please provide a feedback on my proposal when you have time . No hurry. https://github.com/Expensify/App/issues/74998#issuecomment-3648650037
@sandipanghos Welcome! 👋 Thanks for the proposal - you can generally expect proposals to be reviewed within 24 hours during the working week.
Regarding the proposal that you've posted, please ensure that you read the contributing guide thoroughly, including the section that links to the proposal template, which you should use and follow exactly.
@sandipanghos Welcome! 👋 Thanks for the proposal - you can generally expect proposals to be reviewed within 24 hours during the working week.
Regarding the proposal that you've posted, please ensure that you read the contributing guide thoroughly, including the section that links to the proposal template, which you should use and follow exactly.
@jjcoffee
Proposal
@jjcoffee Thanks for the guidance! I've updated my proposal to follow the official template exactly. Please let me know if any further adjustments are needed.
@sandipanghos Thanks! Sorry to be pedantic, but please copy the proposal template exactly as it appears here.
Also a little bit of pre-feedback, please link to areas of code that you're referring to in both your root cause and solution.
For example, here you can link to where the policy formula is calculated:
When the report title fails to compute based on the policy formula (due to missing, invalid, or incomplete data), the logic falls back to using the report ID as the title.
The solution should also contain specific changes you propose to make to fix the issue (relating the changes back to the root cause). Note that in general posting entire code diffs is unhelpful.
here ok will update as soon as possible
@sandipanghos Thanks! Sorry to be pedantic, but please copy the proposal template exactly as it appears here.
Also a little bit of pre-feedback, please link to areas of code that you're referring to in both your root cause and solution.
For example, here you can link to where the policy formula is calculated:
When the report title fails to compute based on the policy formula (due to missing, invalid, or incomplete data), the logic falls back to using the report ID as the title.
The solution should also contain specific changes you propose to make to fix the issue (relating the changes back to the root cause). Note that in general posting entire code diffs is unhelpful.
@jjcoffee Report name must not change to the report ID is already fixed i think because i cannot reproduce it new.expensify.com or stsaging.new.expensify.com .but i will check . can you confirm on this also . currently there is already a function available populateOptimisticReportFormula which do the same as i created for title generation based on policy . so i update the proposal on that if some change require.
in case for the id issue code change not required because already fixed So shall i will remove the change i done to fix for this from proposal but include the change for status properly update in the proposal. Will you consider in such case my proposal and payment
Regarding status correction -
- Currently for report title status OPEN in subtitle status is showing Draft in new.expensify.com and staging.new.expensify.com. Should i change it to Open and rest status keep as it is?
- Currently when the status is approve the expense don't change their title as per new policy formula updated .So even the report is approved the expense title is showing processing . To avoid this shall change it to after approve status instead of approve status.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@jjcoffee Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Report name must not change to the report ID, the status must update correctly.
Hi @jjcoffee, the expected behavior is unclear to me. What does the status must update correctly means? Does it mean, after changing the defaultTitle it should affect the existing expense report's header? Because, currently it only affects the header of expense reports created after changing the defaultTitle.
Issue not reproducible during KI retests. (First week)