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

[$250] Expense - Merchant's ‘Duplicate’ error message does not disappear after changing i #53212

Open
2 of 8 tasks
IuliiaHerets opened this issue Nov 27, 2024 · 8 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Overdue

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 27, 2024

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.0.67-1
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Open the URL: https://staging.new.expensify.com/
  2. Create a WS
  3. Create and submit an expense to the WS with: Amount: 123, Merchant: hhh
  4. Repeat step 3
  5. Click on 'Search' between Settings & Inbox
  6. Find the expense and do a click on it
  7. Change the merchant name

Expected Result:

After changing the merchant's name, the error message below merchant should disappear.

Actual Result:

After changing the merchant's name, the error message persists. (If you change the amount, the error disappear. However, the error appears below the merchant and it is understood that it is caused by the merchant, not by the amount)

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6677643_1732677726729.Duplicate__error_message_on_Merchant_does_not_disappear_after_the_name_of_the_Merchant_is_changed.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021861836931662502944
  • Upwork Job ID: 1861836931662502944
  • Last Price Increase: 2024-11-27
Issue OwnerCurrent Issue Owner: @sobitneupane
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 27, 2024
Copy link

melvin-bot bot commented Nov 27, 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.

@nkdengineer
Copy link
Contributor

Proposal

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

After changing the merchant's name, the error message persists. (If you change the amount, the error disappear. However, the error appears below the merchant and it is understood that it is caused by the merchant, not by the amount)

What is the root cause of that problem?

duplicatedTransaction violation is mapping to merchant although the reason is the dup amount

duplicatedTransaction: 'merchant',

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

Change this to amount

duplicatedTransaction: 'merchant',

What alternative solutions did you explore? (Optional)

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Nov 27, 2024
@melvin-bot melvin-bot bot changed the title Expense - Merchant's ‘Duplicate’ error message does not disappear after changing i [$250] Expense - Merchant's ‘Duplicate’ error message does not disappear after changing i Nov 27, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 27, 2024
Copy link

melvin-bot bot commented Nov 27, 2024

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

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

melvin-bot bot commented Nov 27, 2024

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

@Anaslancer
Copy link
Contributor

Proposal

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

Expense - Merchant's ‘Duplicate’ error message does not disappear after changing i

What is the root cause of that problem?

When calling the UpdateMoneyRequestMerchant api, Backend didn't return the correct response if the transaction is not duplicated.
Screenshot_16

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

For solving this on frontend side. we should add the onyxData merge block at the above line of API call in the updateMoneyRequestMerchant when the transaction is not duplicated.

    onyxData.successData?.push({
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`,
        value: null,
    });

And we should find the duplicated transaction id and set it as null too.

What alternative solutions did you explore? (Optional)

We can also solve this to send the correct response from Backend.

Contributor details

Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01aff093c9a804b145

Copy link

melvin-bot bot commented Nov 28, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@David-0910
Copy link

Proposal

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

Expense - Merchant's ‘Duplicate’ error message does not disappear after changing i

What is the root cause of that problem?

After changing the merchant name, UpdateMoneyRequestMerchant api doesn't return the correct response.
The duplicatedTransaction violation should depend on the merchant name, but it seems, now backend trigger this violation based on the amount.

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

We should fix the backend logic to consider the merchant name, not the amount.

What alternative solutions did you explore? (Optional)

I'm not sure when we should show 'Duplicate' warning but if we have to show this on the expenses where both amount and merchant name are the same, then we should fix the current workflow.

@melvin-bot melvin-bot bot added the Overdue label Nov 29, 2024
Copy link

melvin-bot bot commented Nov 29, 2024

📣 @David-0910! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

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 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Overdue
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants