Skip to content

[Hold] [$250] Rules - Custom report names do not apply #58694

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: v9.1.15-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5763335
Email or phone of affected tester (no customers): sustinov@applausemail.com
Issue reported by: Applause Internal Team
Device used: Macbook/15.3/Chrome, OnePlus 9 PRO/Android 14/Chrome, iPhone 12 PRO/iOS 18.3.1
App Component: Workspace Settings

Action Performed:

Prerequisites:
As administrator, create a new WS, enable Report fields and Rules in the settings, invite the employee

Steps:

  1. Open https://staging.new.expensify.com/
  2. Log in as an administrator
  3. Navigate to WS settings
  4. Navigate to Rules
  5. In Expense reports, enable Custom report names
  6. In the Custom name field, add any report name
  7. Save
  8. In incognito mode, log in under the employee login
  9. Navigate to the WS room
  10. Create any 2 manual expenses
  11. Note the Report fields that appear
  12. Navigate to the report details
  13. Note the name of the report

Expected Result:

When Custom report names is enabled, the report name should change to a custom report name, the employee should be able to edit the name of the report, unless prohibited from doing so

Actual Result:

Custom report names are not applied, instead Report fields appear with the value from Custom name, the employee cannot edit the report name

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021903036923022733382
  • Upwork Job ID: 1903036923022733382
  • Last Price Increase: 2025-03-21
Issue OwnerCurrent Issue Owner: @hungvu193

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 19, 2025
  2. melvin-bot commented on Mar 19, 2025

    @melvin-bot

    Triggered auto assignment to @flaviadefaria (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. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 21, 2025
  4. changed the title [-]Rules - Custom report names do not apply[/-] [+][$250] Rules - Custom report names do not apply[/+] on Mar 21, 2025
  5. melvin-bot commented on Mar 21, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 21, 2025
  7. melvin-bot commented on Mar 21, 2025

    @melvin-bot

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

  8. flaviadefaria commented on Mar 21, 2025

    @flaviadefaria
    Contributor

    Added external label.

  9. huult commented on Mar 23, 2025

    @huult
    Contributor

    Proposal

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

    Custom report names do not apply

    What is the root cause of that problem?

    There is no check for custom report name from policy settings.

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

    To resolve this issue, we should check for the custom report name from the policy settings. It looks like the custom name doesn't have a function to edit, so we are unable to edit it here.

    App/src/libs/ReportUtils.ts

    Lines 4572 to 4574 in 6ebec36

    if (isMoneyRequestReport(report)) {
    formattedName = getMoneyRequestReportName({report, policy});
    }

    update to:

        if (isMoneyRequestReport(report)) {
            const reportFields = getReportFieldsByPolicyID(report?.policyID);
            const titleReportField = Object.values(reportFields ?? {}).find((reportField) => reportField?.fieldID === CONST.REPORT_FIELD_TITLE_FIELD_ID);
            const policyabcd = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`];
    
            if (titleReportField?.defaultValue && policyabcd?.shouldShowCustomReportTitleOption) {
                formattedName = populateOptimisticReportFormula(titleReportField.defaultValue, report, policy);
            } else {
                formattedName = getMoneyRequestReportName({report, policy});
            }
        }

    Note: I noticed some real updates to the issue. I will look into it further during the PR phase.

    Untitled.mp4

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    Update code for that case

    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.

  10. 33 remaining items

  11. hungvu193 commented on May 1, 2025

    @hungvu193
    Contributor

    Same

  12. melvin-bot commented on May 6, 2025

    @melvin-bot

    @hungvu193 Huh... This is 4 days overdue. Who can take care of this?

  13. hungvu193 commented on May 6, 2025

    @hungvu193
    Contributor

    Still hold for #44340

    Same here

  14. flaviadefaria commented on May 13, 2025

    @flaviadefaria
    Contributor

    Switching this to weekly given it is still on hold.

  15. melvin-bot commented on Jun 6, 2025

    @melvin-bot

    This issue has not been updated in over 15 days. @hungvu193, @flaviadefaria 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!

  16. melvin-bot commented on Aug 19, 2025

    @melvin-bot

    @hungvu193, @flaviadefaria, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2Not a priority

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions