Skip to content
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

[CHECKLIST] [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report #40980

Closed
1 of 6 tasks
lanitochka17 opened this issue Apr 25, 2024 · 34 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

@lanitochka17
Copy link

lanitochka17 commented Apr 25, 2024

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: 1.4.65-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: https://expensify.testrail.io/index.php?/tests/view/4506647
Issue reported by: Applause - Internal Team
*

Action Performed:

Employee - OldDot

  1. Navigate to one of the empty reports
  2. Add an expense to the report

Employee - NewDot

  1. As the employee in NewDot - Navigate to the workspace chat
  2. Verify the report that had the expense added shows the new amount
  3. Click on the report with the newly added expense
  4. Verify the expense is displayed in the report conversation

Employee - OldDot

  1. Navigate to the report with the expense
  2. Delete the expense from the report

Employee - NewDot

  1. As the employee in NewDot - Navigate to the workspace chat
  2. Verify the report that had the expense removed displays $0.00
  3. Verify if the name of Merchant still displayed below the $0.00

Expected Result:

Only $0.00 is shown in the report

Actual Result:

Merchant name of the deleted expense is shown below the $0.00

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6460737_1713988639162.2024-04-24_22-44-17.mp4

Bug6460737_1713988639176!merchantname_shown

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a644000e2f4f8e02
  • Upwork Job ID: 1783553598312005632
  • Last Price Increase: 2024-05-09
  • Automatic offers:
    • akinwale | Reviewer | 0
    • ikevin127 | Contributor | 0
Issue OwnerCurrent Issue Owner: @garrettmknight
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

@lanitochka17
Copy link
Author

@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@garrettmknight
Copy link
Contributor

Repro'd opening it up.

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

@melvin-bot melvin-bot bot changed the title Expense - Merchant name of the deleted expense in OD report is still shown in ND report [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report Apr 25, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

@garrettmknight garrettmknight moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collect Apr 25, 2024
@garrettmknight garrettmknight moved this from Release 1: Spring 2024 (May) to Polish in [#whatsnext] #wave-collect Apr 25, 2024
@garrettmknight garrettmknight added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Apr 25, 2024
@garrettmknight
Copy link
Contributor

Since this is a pretty niche bug and low priority I don't expect this to get fixed intentionally, quickly, but we could very well fix it elsewhere with our backwards compatibility work so I'm setting it for a retest weekly.

@fitd-tech
Copy link

fitd-tech commented Apr 26, 2024

Proposal

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

We don't want to display a Merchant name when the total owed is $0.00 (meaning the expense has been deleted).

What is the root cause of that problem?

I can't find a good indicator of whether the expense has been deleted, because the iouReport passed to the ReportPreview component doesn't seem to show updated information (the total amount is always 0, for instance). Instead, we're getting the total amount from the action message string:

// If iouReport is not available, get amount from the action message (Ex: "Domain20821's Workspace owes $33.00" or "paid ₫60" or "paid -₫60 elsewhere")
let displayAmount = '';
const actionMessage = action.message?.[0]?.text ?? '';
const splits = actionMessage.split(' ');
splits.forEach((split) => {
if (!/\d/.test(split)) {
return;
}

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

For the sake of this particular Issue, we can set shouldShowSubtitle to false when getDisplayAmount returns'$0.00' and numberOfRequests equals 1 (in addition to the existing conditions):

const shouldShowSubtitle = !isScanning && (shouldShowSingleRequestMerchantOrDescription || numberOfRequests > 1);

The video attached to the Issue shows some other issues. You must click on the report preview in order for the report to update and reflect the new $0.00 amount. The user would still have to perform this step in order for the merchant name to be removed. I would assume that this is a known issue, but I can attempt to resolve it here if you'd like.

What alternative solutions did you explore? (Optional)

We could also only set formattedMerchant if the above conditions aren't true, instead of removing the subtitle altogether:

let formattedMerchant = numberOfRequests === 1 ? TransactionUtils.getMerchant(allTransactions[0]) : null;

I could also look into getting the updated iouReport so we explicitly know if the IOU total is $0.00.

@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2024
@garrettmknight
Copy link
Contributor

@akinwale mind giving this proposal a review when you get a chance?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 29, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

Copy link

melvin-bot bot commented May 2, 2024

@garrettmknight, @akinwale Whoops! This issue is 2 days overdue. Let's get this updated quick!

@akinwale
Copy link
Contributor

akinwale commented May 2, 2024

Still looking for proposals here.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 2, 2024
Copy link

melvin-bot bot commented May 7, 2024

@garrettmknight, @akinwale Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented May 8, 2024

@garrettmknight, @akinwale Huh... This is 4 days overdue. Who can take care of this?

@ikevin127
Copy link
Contributor

PR #42015 ready for review! 🚀

@mvtglobally
Copy link

Issue is reproducible during KI retests.

1715460438165.bandicam_2024-05-11_23-44-33-097.mp4

@mvtglobally mvtglobally removed the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label May 16, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report [HOLD for payment 2024-06-05] [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-7 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 2024-06-05. 🎊

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

Copy link

melvin-bot bot commented May 29, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@akinwale / @ikevin127] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale / @ikevin127] 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:
  • [@akinwale / @ikevin127] A discussion in #expensify-bugs 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:
  • [@akinwale / @ikevin127] Determine if we should create a regression test for this bug.
  • [@akinwale / @ikevin127] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ikevin127
Copy link
Contributor

  • [@ikevin127] The PR that introduced the bug has been identified. Link to the PR: ❌

Since this is a cross-app edge case (OD to ND), there was no offending PR that introduced this since we're not testing front-end ND pull requests on OD in order to catch this kind of edge cases.

  • [@ikevin127] 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: ❌
  • [@ikevin127] A discussion in #expensify-bugs 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: ❌

Since we're migrating the platform from OD to ND, I don't think we should start a discussion or update the PR review checklist to extend testing of ND features to OD.

  • [@ikevin127] Determine if we should create a regression test for this bug.
  • [@ikevin127] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

Employee - OldDot

  1. Navigate to one of the empty reports.
  2. Add an expense with merchant to the report.

Employee - NewDot

  1. As the employee in NewDot - navigate to the workspace chat.
  2. Verify the report preview is matching the OD expense's amount and merchant.

Employee - OldDot

  1. Navigate to the report with the expense.
  2. Delete the expense from the report.

Employee - NewDot

  1. As the employee in NewDot - navigate to the workspace chat.
  2. Verify that the report which had the expense removed displays $0.00 amount now.
  3. Verify that the merchant is not shown anymore underneath the amount. ⬇️
    Note: If the change did not propagate yet, navigate to another LNH report then return back to the workspace chat in order for the report data to re-fetch.

Do we agree 👍 or 👎.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jun 4, 2024
@deetergp
Copy link
Contributor

deetergp commented Jun 5, 2024

Just a couple days out from the hold expiring 👍

@garrettmknight
Copy link
Contributor

Payment Summary:

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2024
@garrettmknight
Copy link
Contributor

@akinwale can you finish the checklist when you get a chance?

@garrettmknight garrettmknight added Weekly KSv2 and removed Daily KSv2 labels Jun 5, 2024
@garrettmknight garrettmknight changed the title [HOLD for payment 2024-06-05] [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report [CHECKLIST] [$250] Expense - Merchant name of the deleted expense in OD report is still shown in ND report Jun 5, 2024
@akinwale
Copy link
Contributor

akinwale commented Jun 6, 2024

@garrettmknight Looks like @ikevin127 already completed it: #40980 (comment)

@ikevin127 The bot tends to get confused when it's also a C+ acting as a contributor so it tags both. The C+ who did the review is responsible for completing the checklist.

@garrettmknight
Copy link
Contributor

Ah, gotcha, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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
No open projects
Archived in project
Development

No branches or pull requests

7 participants