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

[HOLD for payment 2024-08-02] [$250] Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant #45865

Closed
6 tasks done
lanitochka17 opened this issue Jul 21, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 21, 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: 9.0.10-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Submit two expenses with same content for every field (amount, description, merchant and category)
  4. Go to transaction thread of any expense
  5. Click Review duplicates
  6. Select Keep this one (any)
  7. Proceed to confirmation page

Expected Result:

All the fields will reflect the correct information on the confirmation page

Actual Result:

Merchant field is empty on the confirmation page when there is info on merchant field.

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

Bug6548605_1721561004558.bandicam_2024-07-21_19-11-39-312.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a0550d2189cf44a1
  • Upwork Job ID: 1815322514359268142
  • Last Price Increase: 2024-07-22
Issue OwnerCurrent Issue Owner: @twisterdotcom
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 21, 2024
Copy link

melvin-bot bot commented Jul 21, 2024

Triggered auto assignment to @twisterdotcom (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 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API and removed Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 21, 2024
Copy link

melvin-bot bot commented Jul 21, 2024

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

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.

@lanitochka17
Copy link
Author

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

@dominictb
Copy link
Contributor

Proposal

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

  • Merchant field is empty on the confirmation page when there is info on merchant field.

What is the root cause of that problem?

  • With merchant field, we always use:
    const allFieldsAreEqual = transactions.every((item) => keys.every((key) => item?.[key] === firstTransaction?.[key]));

    but keys is ["modifiedMerchant", "merchant"].
  • So firstTransaction?["modifiedMerchant"] can be "".

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

                    if (fieldName === 'merchant') {
                        keep[fieldName] = isEmpty(firstTransaction?.[keys[0]]) ? firstTransaction?.[keys[1]] : firstTransaction?.[keys[0]];
                    } else {
                        keep[fieldName] = firstTransaction?.[keys[0]];
                    }

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jul 22, 2024

Proposal

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

Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant

What is the root cause of that problem?

We are using ?? instead of || so when updatedTransaction?.modifiedMerchant is a empty string the fallback value merchantTitle isn't use.

title={updatedTransaction?.modifiedMerchant ?? merchantTitle}

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

Use || instead of ?? or use ternary operator updatedTransaction?.modifiedMerchant && updatedTransaction?.modifiedMerchant !== '' ? updatedTransaction?.modifiedMerchant : merchantTitle.

We should also check for similar issue in other fields as well.

What alternative solutions did you explore? (Optional)

@twisterdotcom
Copy link
Contributor

Dupe Detection is still under Beta, so I don't think this needs to be Hourly. We can make it Daily.

@twisterdotcom twisterdotcom added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed Hourly KSv2 labels Jul 22, 2024
@melvin-bot melvin-bot bot changed the title Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant [$250] Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@mountiny mountiny removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 22, 2024
@mountiny
Copy link
Contributor

And since its in beta we can also remove the blocker labels

@mountiny
Copy link
Contributor

@parasharrajat
Copy link
Member

We did fix this issue on the PR. May be there are more cases to be handled. @kubabutkiewicz please add this as well.

@pecanoro
Copy link
Contributor

@francoisl I am reassigning the issue to myself so I can review and track the fixes since this is for the duplicate detection project that I am handling.

@pecanoro pecanoro assigned pecanoro and unassigned francoisl Jul 22, 2024
@pecanoro pecanoro added Weekly KSv2 and removed Help Wanted Apply this label when an issue is open to proposals by contributors Daily KSv2 labels Jul 22, 2024
@pecanoro pecanoro added the Reviewing Has a PR in review label Jul 22, 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 Jul 26, 2024
@melvin-bot melvin-bot bot changed the title [$250] Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant [HOLD for payment 2024-08-02] [$250] Dupe detect - Merchant field is empty on the confirmation page when there is info on merchant Jul 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

Copy link

melvin-bot bot commented Jul 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 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-08-02. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 1, 2024
@twisterdotcom
Copy link
Contributor

@mountiny or @pecanoro who is due payment here? Just @parasharrajat for reviewing #45890?

@twisterdotcom
Copy link
Contributor

Payment Summary:

@parasharrajat
Copy link
Member

Payment requested as per #45865 (comment)

@JmillsExpensify
Copy link

$250 approved for @parasharrajat

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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
Archived in project
Development

No branches or pull requests

10 participants