App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Report titles inconsistent between user-created and Concierge-created reports

Open m-natarajan opened this issue 2 months ago • 28 comments

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: 9.2.36-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @brianlee-expensify Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Go to a workspace with a Custom Report Name format defined
  2. Create a report manually as a user → observe the report title format
  3. Create a report automatically via Concierge (e.g. SmartScan or automation) → observe the report title format

Expected Result:

Report titles should always follow the workspace Custom Report Names configuration, even if not enforced, regardless of who or what created the report.

Actual Result:

Report titles are inconsistent—user-created reports use a default format while Concierge-created reports follow the Custom Report Name settings, even when not enforced.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • [ ] Android: App
  • [ ] Android: mWeb Chrome
  • [x] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • [ ] Android: App
  • [ ] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/57aa9b04-99d1-4792-b4af-1d325cd245cd

https://github.com/user-attachments/assets/402fa373-7539-4c92-a357-f0e62ee9e13a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021986431173000979123
  • Upwork Job ID: 1986431173000979123
  • Last Price Increase: 2025-12-25
Issue OwnerCurrent Issue Owner: @ahmedGaber93

m-natarajan avatar Oct 22 '25 21:10 m-natarajan

Triggered auto assignment to @dylanexpensify (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.

melvin-bot[bot] avatar Oct 22 '25 21:10 melvin-bot[bot]

@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Oct 27 '25 23:10 melvin-bot[bot]

@dylanexpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

melvin-bot[bot] avatar Oct 31 '25 23:10 melvin-bot[bot]

@m-natarajan can you still repro?

dylanexpensify avatar Nov 04 '25 17:11 dylanexpensify

@dylanexpensify Able to reproduce this in windows 11 chrome v9.2.44-1

https://github.com/user-attachments/assets/20252385-2e88-4d4d-a1a5-6ae3a5ec41bb

m-natarajan avatar Nov 05 '25 13:11 m-natarajan

@dylanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Nov 05 '25 21:11 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~021986431173000979123

melvin-bot[bot] avatar Nov 06 '25 13:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

melvin-bot[bot] avatar Nov 06 '25 13:11 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Nov 13 '25 16:11 melvin-bot[bot]

Waiting on proposals

ahmedGaber93 avatar Nov 14 '25 03:11 ahmedGaber93

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Nov 20 '25 16:11 melvin-bot[bot]

Waiting on proposals

ahmedGaber93 avatar Nov 20 '25 18:11 ahmedGaber93

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Nov 27 '25 16:11 melvin-bot[bot]

@ahmedGaber93 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

melvin-bot[bot] avatar Nov 27 '25 23:11 melvin-bot[bot]

Waiting on proposals

ahmedGaber93 avatar Nov 28 '25 08:11 ahmedGaber93

@ahmedGaber93 Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Dec 04 '25 00:12 melvin-bot[bot]

Waiting on proposals

ahmedGaber93 avatar Dec 04 '25 04:12 ahmedGaber93

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 04 '25 16:12 melvin-bot[bot]

@dylanexpensify I will be OOO for the next 3 weeks. Please reassign this. Thanks!

ahmedGaber93 avatar Dec 05 '25 13:12 ahmedGaber93

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 11 '25 16:12 melvin-bot[bot]

@ahmedGaber93 10 days overdue. I'm getting more depressed than Marvin.

melvin-bot[bot] avatar Dec 16 '25 23:12 melvin-bot[bot]

🚨 Edited by proposal-police: This proposal was edited at 2025-12-17 11:04:10 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Report titles are inconsistent between user-created and Concierge-created reports. When a user manually creates a report, it uses the default format ({policyName} owes {amount}), while Concierge-created reports correctly follow the workspace's Custom Report Name settings

This creates a confusing user experience where identical actions produce different report naming outcomes depending on who initiated the report creation..

What is the root cause of that problem?

The root cause is a redundant defensive policy type check in the client-side optimistic report creation that doesn't exist on the backend.

When building an optimistic expense report, the code checks: https://github.com/Expensify/App/blob/4f15a9fe27f40811f00f37836168df816f6eabd1/src/libs/ReportUtils.ts#L6958-L6961

The condition isGroupPolicy(policy?.type ?? '') is redundant because:

  1. The presence of titleReportField.defaultValue already implies a paid workspace with Custom Report Names configured
  2. Personal policies don't have fieldList.text_title, so they are naturally excluded
  3. When policy data isn't fully loaded, policy?.type is undefined, causing fallback to '' and isGroupPolicy('') returns false, skipping the custom formula

The backend always applies the custom formula when titleReportField exists, without this extra policy type check. This creates the inconsistency.

A similar issue exists in the IOU-to-expense conversion flow, which uses isPaidGroupPolicy(policy): https://github.com/Expensify/App/blob/f099b1b82b3764bafe4eaed610b4ddbc322a6799/src/libs/actions/Report.ts#L5469-L5472

What changes do you think we should make in order to solve the problem?

Remove the redundant isGroupPolicy/isPaidGroupPolicy checks and rely solely on the presence of titleReportField.defaultValue

In buildOptimisticExpenseReport() (ReportUtils.ts): Change the condition from checking both titleReportField AND isGroupPolicy(policy?.type) to only checking if titleReportField?.defaultValue exists

In convertIOUReportToExpenseReport() (Report.ts): Apply the same change - check only titleReportField?.defaultValue instead of also checking isPaidGroupPolicy(policy).

Some context :

  • The presence of titleReportField.defaultValue already implies a paid workspace with Custom Report Names configured
  • Personal policies don't have fieldList.text_title configured, so they are naturally excluded
  • This pattern already exists in buildOptimisticEmptyReport() which does NOT use the policy type check: https://github.com/Expensify/App/blob/4f15a9fe27f40811f00f37836168df816f6eabd1/src/libs/ReportUtils.ts#L6970-L6993
  • This approach aligns client behavior with backend behavior

What alternative solutions did you explore? (Optional)

--> Wait for policy to load before building optimistic report ,Problem: it delays UI response and violates the optimistic update pattern that makes the app feel fast

-->Let backend override optimistic name on success response ,Problem: it causes a visible "flash" of the wrong name before correction, and doesn't fix the problem

mavrickdeveloper avatar Dec 17 '25 10:12 mavrickdeveloper

@dylanexpensify I can take over as C+ based on https://github.com/Expensify/App/issues/73263#issuecomment-3616902040.

situchan avatar Dec 17 '25 10:12 situchan

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 18 '25 16:12 melvin-bot[bot]

@ahmedGaber93 12 days overdue now... This issue's end is nigh!

melvin-bot[bot] avatar Dec 18 '25 23:12 melvin-bot[bot]

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Dec 20 '25 15:12 mvtglobally

This issue has not been updated in over 14 days. @ahmedGaber93, @dylanexpensify eroding to Weekly issue.

melvin-bot[bot] avatar Dec 22 '25 23:12 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 25 '25 16:12 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jan 01 '26 16:01 melvin-bot[bot]

Also, I’m unable to reproduce the issue, and both reported cases follow the workspace Custom Report Names configuration.

Image

ahmedGaber93 avatar Jan 05 '26 06:01 ahmedGaber93