Skip to content

[$250] Report title created offline does not match the custom formula until going online #80197

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.6-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #77928
Email or phone of affected tester (no customers): fischer9966+012126+77928@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacOS 26.2 / Chrome, Safari. iPhone 16 Pro / 26.2. Google Pixel 5 / Android 14
App Component: Workspace Settings

Action Performed:

Precondition:

  1. Create or use an existing Team or Corporate workspace (not a personal workspace)
  2. Go to Settings > Workspaces > [Your Workspace] > Report Fields
  3. Set up a custom Report Title formula. For example: {report:type} = {report:total}

Steps:

  1. Go Offline
  2. Create a new expense in a workspace with custom report title formula
  3. Verify that the report title should match the custom formula

Expected Result:

Report title created offline match the custom formula

Actual Result:

Report title created offline does not match the custom formula until going online

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022014509338012714792
  • Upwork Job ID: 2014509338012714792
  • Last Price Increase: 2026-01-23
Issue OwnerCurrent Issue Owner: @deetergp

Activity

  1. added
    Daily
    Bug
    on Jan 22, 2026
  2. melvin-bot commented on Jan 22, 2026

    @melvin-bot

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

  3. nkdengineer commented on Jan 22, 2026

    @nkdengineer
    Contributor

    Proposal

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

    Report title created offline does not match the custom formula until going online

    What is the root cause of that problem?

    The custom report title is only applied in optimistic data when CUSTOM_REPORT_NAMES beta is enabled.

    if (Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, allBetas)) {

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

    Since it's applied for all users now, we can remove this permission check.

    if (Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, allBetas)) {

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. etCoderDysto commented on Jan 22, 2026

    @etCoderDysto
    Contributor

    Proposal

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

    Report title created offline does not match the custom formula until going online

    What is the root cause of that problem?

    We only compute report name when report names beta is enabled in

    1. inside buildOptimisticExpenseReport when we create optimistic report with expense

      App/src/libs/ReportUtils.ts

      Lines 6881 to 6889 in 3779ccf

      if (Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, allBetas)) {
      const titleReportField = getTitleReportField(getReportFieldsByPolicyID(policyID) ?? {});
      if (!!titleReportField && isGroupPolicy(policy?.type ?? '')) {
      const formulaContext: FormulaContext = {
      report: expenseReport,
      policy,
      allTransactions: reportTransactions ?? {},
      };
    2. Inside buildOptimisticEmptyReport when we create empty optimistic report

      App/src/libs/ReportUtils.ts

      Lines 6936 to 6946 in 3779ccf

      if (Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, allBetas)) {
      const formulaContext: FormulaContext = {
      report: optimisticEmptyReport as Report,
      policy,
      allTransactions: {},
      };
      // We use dynamic require here to avoid a circular dependency between ReportUtils and Formula
      // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
      const Formula = require('./Formula') as {compute: (formula?: string, context?: FormulaContext) => string};
      const optimisticReportName = Formula.compute(titleReportField?.defaultValue ?? CONST.POLICY.DEFAULT_REPORT_NAME_PATTERN, formulaContext);

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

    We should remove the isBetaEnabled check from both places (buildOptimisticExpenseReport and buildOptimisticEmptyReport as custom report title is out of beta feature now

    Note: We should make similar changes here

    function updateTitleFieldToMatchPolicy(reportID: string, policy?: Policy): Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS>> {
    if (!Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, betas, betaConfiguration)) {
    return [];
    }

    And here too
    function removeTitleFieldFromReport(reportID: string): Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS>> {
    if (!Permissions.isBetaEnabled(CONST.BETAS.CUSTOM_REPORT_NAMES, betas, betaConfiguration)) {
    return [];

    We should check every place where CONST.BETAS.CUSTOM_REPORT_NAMES is used

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  5. annaweber830 commented on Jan 22, 2026

    @annaweber830
    Contributor

    Hi I am not able to reproduce.

  6. RachCHopkins commented on Jan 23, 2026

    @RachCHopkins
    Contributor

    Not loving these repro steps.

    1. Go Offline
    2. Create a new expense in a workspace with custom report title formula - I am offline, so I can't SmartScan. So I guess this means create a new report and manually add an expense.
    3. Verify that the report title should match the custom formula - Where from? I can't load the reports page and I can't load the workspace chat, because I am offline!!
  7. RachCHopkins commented on Jan 23, 2026

    @RachCHopkins
    Contributor

    Ok, actual repro steps:

    1. Start in the workspace chat with no open reports
    2. Go offline by disabling wifi, not by navigating to Troubleshooting > Offline mode. Stay in the workspace chat.
    3. Manually create a placeholder expense (do not smartscan) from within the workspace chat

    Optimistic report title does not use workspace report formula until back online.

  8. added
    External
    on Jan 23, 2026
  9. changed the title [-]Report title created offline does not match the custom formula until going online[/-] [+][$250] Report title created offline does not match the custom formula until going online[/+] on Jan 23, 2026
  10. melvin-bot commented on Jan 23, 2026

    @melvin-bot
  11. added
    Help Wanted
    on Jan 23, 2026
  12. melvin-bot commented on Jan 23, 2026

    @melvin-bot

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

  13. 13 remaining items

  14. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @deetergp, @RachCHopkins, @ZhenjaHorbach, @nkdengineer eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  15. ZhenjaHorbach commented on Mar 17, 2026

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: 294c480#r179771115

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    • Create or use an existing Team or Corporate workspace (not a personal workspace)
    • Go to Settings > Workspaces > [Your Workspace] > Report Fields
    • Set up a custom Report Title formula. For example: {report:type} = {report:total}

    Test:

    1. Go Offline
    2. Create a new expense in a workspace with custom report title formula
    3. Verify that the report title should match the custom formula

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-14d8-a097-1469-dab71bd01bf4
  16. added
    Daily
    Awaiting Payment
    and removed
    Reviewing
    on Mar 17, 2026
  17. melvin-bot commented on Mar 17, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  18. mallenexpensify commented on Mar 17, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $250 via NewDot
    Contributor+: @ZhenjaHorbach due $250 via NewDot

    ^ Test case created

    thx

  19. garrettmknight commented on Mar 18, 2026

    @garrettmknight
    Contributor

    $250 approved for @ZhenjaHorbach

  20. twisterdotcom commented on Mar 19, 2026

    @twisterdotcom
    Contributor

    @nkdengineer has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-5c9d-a849-9fa1-215001328964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions