Skip to content

[Due for payment 2025-04-08] [$250] "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot #59101

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
1 of 8 tasks
m-natarajan opened this issue Mar 25, 2025 · 24 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Mar 25, 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: v9.1.19-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @danielrvidal
Slack conversation (hyperlinked to channel name): #expensify-migrate

Action Performed:

Workspace setup:

  • Weekly scheduled submit
  • Submit & Close
  • Submits to themself

Steps:

  1. Create a report on OldDot
  2. Add an expense to it
  3. Switch over to NewDot
  4. Go to the Reports page
  5. Observe the To: field in that report in the search results displays as Hidden

Expected Result:

Leave the To: field blank on open expense reports.

Actual Result:

  • The To: field shows Hidden if the report is created via OldDot
  • The To: field is populated if the report is created via Create expense in NewDot
  • The To: field shows Hidden if the report is created via Create report in NewDot (feature is behind a beta).
Image

Workaround:

Create the report on NewDot

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

2025-03-26_15-20-50.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021904916867082880585
  • Upwork Job ID: 1904916867082880585
  • Last Price Increase: 2025-03-26
  • Automatic offers:
    • nkdengineer | Contributor | 106680985
Issue OwnerCurrent Issue Owner: @thesahindia
@m-natarajan m-natarajan added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Needs Reproduction Reproducible steps needed labels Mar 25, 2025
Copy link

melvin-bot bot commented Mar 25, 2025

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

@m-natarajan m-natarajan added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Mar 25, 2025
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@trjExpensify trjExpensify changed the title "Hidden" shown in the "To" field in the reports page "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot Mar 26, 2025
@trjExpensify trjExpensify removed Needs Reproduction Reproducible steps needed retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause labels Mar 26, 2025
@trjExpensify
Copy link
Contributor

Coming from the thread. I can repro this reliably. Updated the OP with the steps.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Mar 26, 2025
@melvin-bot melvin-bot bot changed the title "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot [$250] "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot Mar 26, 2025
Copy link

melvin-bot bot commented Mar 26, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 26, 2025
Copy link

melvin-bot bot commented Mar 26, 2025

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

@nkdengineer
Copy link
Contributor

I think it's a backend bug, the report is created from OldDot has managerID is 0.

@trjExpensify
Copy link
Contributor

Alright, we talked about this one in thread here. To not rock the boat on how OldDot works, we'd like to not show the To: value on all open draft expense reports in NewDot. As such, we think this can be external. CC: @mountiny

@nkdengineer
Copy link
Contributor

nkdengineer commented Mar 26, 2025

Proposal

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

The To: field shows Hidden

What is the root cause of that problem?

When we create a draft report in OD, managerID is 0 and the formattedTo always fallback to Hidden

const formattedTo = formatPhoneNumber(getDisplayNameOrDefault(to));

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

We can return the formattedTo as empty if the report of transaction is an open expense report

const report = data[`${ONYXKEYS.COLLECTION.REPORT}${transactionItem.reportID}`];
const shouldShowBlankTo = isOpenExpenseReport(report) ;
formattedTo: shouldShowBlankTo ? '' : formattedTo,

formattedTo,

Do the same here.

formattedTo,

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

If need we can test getTransactionItemCommonFormattedProperties and verify that the formattedTo is empty if shouldShowBankTo is true.

What alternative solutions did you explore? (Optional)

We can introduce a new param, shouldShowBankTo in getTransactionItemCommonFormattedProperties and will not fallback the formattedTo to hidden if shouldShowBankTo is true

const formattedTo = formatPhoneNumber(getDisplayNameOrDefault(to, undefined, shouldShowBlankTo));

const formattedTo = formatPhoneNumber(getDisplayNameOrDefault(to));

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.

@nkdengineer
Copy link
Contributor

The To: field is populated if the report is created via Create expense in NewDot

@trjExpensify Do we want to display the blank for this case?

@trjExpensify
Copy link
Contributor

Yeah, we do, otherwise it's a weird inconsistency of NewDot created draft open reports.

@nkdengineer
Copy link
Contributor

Got it, updated proposal.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 26, 2025
Copy link

melvin-bot bot commented Mar 26, 2025

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@mountiny
Copy link
Contributor

@nkdengineer Thanks for the proposal, makes sense to me, feel free to raise a PR

@melvin-bot melvin-bot bot added the Weekly KSv2 label Mar 27, 2025
@nkdengineer
Copy link
Contributor

@thesahindia The PR is ready for review.

@trjExpensify
Copy link
Contributor

👋 let's make sure we get Applause furnished with the updated expectation for not showing To: on the Reports page for open draft reports.

Particularly, we noticed here that they created a deploy blocker as a result of executing this test. There might be others. Thanks!

@trjExpensify trjExpensify reopened this Mar 31, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 1, 2025
@melvin-bot melvin-bot bot changed the title [$250] "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot [Due for payment 2025-04-08] [$250] "Hidden" shown in the "To" field in the reports page on draft open reports created via OldDot Apr 1, 2025
Copy link

melvin-bot bot commented Apr 1, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 1, 2025
Copy link

melvin-bot bot commented Apr 1, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.21-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-04-08. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Apr 1, 2025

@thesahindia @maddylewis @thesahindia The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@maddylewis maddylewis added Daily KSv2 and removed Weekly KSv2 labels Apr 7, 2025
@melvin-bot melvin-bot bot added the Overdue label Apr 7, 2025
@maddylewis
Copy link
Contributor

tomorrow

@melvin-bot melvin-bot bot added Daily KSv2 and removed Overdue Daily KSv2 labels Apr 7, 2025
@maddylewis
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [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:

  • [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:

  • [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 Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree 👍 or 👎

@maddylewis
Copy link
Contributor

maddylewis commented Apr 10, 2025

Payments & To-dos

@maddylewis
Copy link
Contributor

@thesahindia - does this require a regression test?

@maddylewis maddylewis added Weekly KSv2 and removed Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Apr 10, 2025
@mountiny
Copy link
Contributor

I do not think this requires regression test

@garrettmknight
Copy link
Contributor

$250 approved for @thesahindia

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests

8 participants