Skip to content

Invoice- Invoice report title is "user owes amount", but Report field shows Invoice YYYY-MM-DD #60274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 of 8 tasks
mitarachim opened this issue Apr 15, 2025 · 12 comments
Closed
6 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 15, 2025

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.1.28-1
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Workspace has enabled Invoices feature.
  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice.
  3. Send an invoice to any user.
  4. Go to invoice thread.

Expected Result:

Report field and invoice report title should be the same.

Actual Result:

Invoice report title is "user owes amount", but Report field shows Invoice YYYY-MM-DD

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6802647_1744720195508.20250415_202731.mp4
Image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @waterim
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

Triggered auto assignment to @amyevans (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 15, 2025

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

Copy link

melvin-bot bot commented Apr 15, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 15, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@ashuvssut
Copy link
Contributor

ashuvssut commented Apr 15, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-04-15 15:31:32 UTC.

Proposal

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

Invoice report title is "user owes amount", but Report field shows Invoice YYYY-MM-DD

What is the root cause of that problem?

In the ReportID field's <MenuItemWithTopDescription /> JSX, we are using, title={parentReport?.reportName}

<OfflineWithFeedback pendingAction={getPendingFieldAction('reportID')}>
<MenuItemWithTopDescription
shouldShowRightIcon
title={parentReport?.reportName}

Instead, we should be creating the title using getReportName utility function

getReportName(parentReport);  // returns `<user> owes <amount>` title

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

In MonetyRequestView.tsx import getReportName (import {getReportName} from '@libs/ReportUtils';)

then create the required title by using getReportName function and add it in the title prop of <MenuItemWithTopDescription/>:

<OfflineWithFeedback pendingAction={getPendingFieldAction('reportID')}>
  <MenuItemWithTopDescription
    shouldShowRightIcon
    title={getReportName(parentReport) || parentReport?.reportName}

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

N/A

What alternative solutions did you explore? (Optional)

N/A

Copy link
Contributor

⚠️ @ashuvssut Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@neil-marcellini
Copy link
Contributor

@mitarachim why can't you test on production? Please show what you see there next time.

On production we don't render the Report field on the report since that's a new thing.

Image

It only shows on staging.

Image

As the contributor said it renders the parent report name.

The parent report of the report prop in MoneyRequestView is the reportID shown in the URL

Image

On staging this is the reportName

reportID: "8029387476440328"
reportName: "Invoice 2025-04-15"

On prod it's this

reportID: "3554834176911338"
reportName: "Invoice 2025-04-15"

Since the backend data has the same name I think this appears as a new bug because we started displaying it on the frontend recently. The fundamental issue is the mismatch between NewDot ignoring the default report title formula and the backend using it. That's tracked by this issue.

In the meantime maybe we can implement the contributors proposal to make the names match. Or we can revert, or consider it not a bug at this point. I'm not sure what's best.

Removing the api deploy blocker label.

@neil-marcellini neil-marcellini self-assigned this Apr 15, 2025
@neil-marcellini neil-marcellini removed the DeployBlocker Indicates it should block deploying the API label Apr 15, 2025
@amyevans amyevans added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 15, 2025
@amyevans
Copy link
Contributor

Looks like it was introduced in #58597 - @waterim @luacmartins do y'all want to handle it as a follow up?

@luacmartins
Copy link
Contributor

Added to the follow up list

Copy link

melvin-bot bot commented Apr 21, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Apr 21, 2025
Copy link

melvin-bot bot commented Apr 23, 2025

@waterim Still overdue 6 days?! Let's take care of this!

@luacmartins
Copy link
Contributor

This is fixed in staging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants