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

Dupe detection - Expenses with the same amount but different merchants are considered dupes #47106

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 8, 2024 · 7 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 8, 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.18-3
Reproducible in staging?: Y
Reproducible in production?: Y
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. Navigate to https://staging.new.expensify.com/
  2. Log in with any Gmail account that has access to an empty workspace chat
  3. Navigate to the workspace chat
  4. Navigate to Composers "+" button - Submit expense - Manual
  5. Create an expense with any amount and merchant
  6. Navigate to Composers "+" button - Submit expense - Manual again
  7. Create another expense with the same amount but with a different merchant

Expected Result:

There shouldn't be a violation at the Merchant field

Actual Result:

Expenses with the same amount but different merchants are considered dupes. "Duplicate" violation can be seen at the Merchant field for both of the expenses

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

Bug6565948_1723142754879.bandicam_2024-08-08_20-37-19-740.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

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

@stephanieelliott 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

@nkdengineer
Copy link
Contributor

nkdengineer commented Aug 9, 2024

Edited by proposal-police: This proposal was edited at 2024-08-09 05:21:51 UTC.

Proposal

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

Expenses with the same amount but different merchants are considered dupes. "Duplicate" violation can be seen at the Merchant field for both of the expenses

What is the root cause of that problem?

The duplicatedTransaction violation is mapping the to merchant field. Then the duplicate violation is displayed in the merchant field.

duplicatedTransaction: 'merchant',

Screenshot 2024-08-09 at 12 21 22

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

I tested the case to create two expenses with different amount and the same merchant, the violation doesn't appear. So I think the duplicatedTransaction should be mapped to amount field.

duplicatedTransaction: 'amount', 

duplicatedTransaction: 'merchant',

What alternative solutions did you explore? (Optional)

Or BE should return the duplicate violation for each field like duplicatedTransactionMerchant for merchant field and duplicatedTransactionAmount for amount, ... then update the mapping here

duplicatedTransaction: 'merchant',

@nkdengineer
Copy link
Contributor

Updated proposal.

  • Edit the image

Copy link

melvin-bot bot commented Aug 12, 2024

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

@stephanieelliott
Copy link
Contributor

This isn't a bug, it's intended behavior -- only the expense date and amount are taken into consideration for dupe detection. The merchant name is not, since credit card and cash/POS merchant names can (and often do) differ.

@nkdengineer
Copy link
Contributor

This isn't a bug, it's intended behavior -- only the expense date and amount are taken into consideration for dupe detection. The merchant name is not, since credit card and cash/POS merchant names can (and often do) differ.

@stephanieelliott Can you please check again, the current problem here is the amount is detected as duplicate but the duplicate violation is displayed in the merchant field.

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. Daily KSv2
Projects
None yet
Development

No branches or pull requests

3 participants