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-02-09] [$125] Split - Error message for merchant required is displayed on failed split in group DM #34914

Closed
2 of 6 tasks
lanitochka17 opened this issue Jan 22, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Monthly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 22, 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.29-0
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/4211016
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Re-requisite: user must have created a group and created a Split bill that will fail

  1. Go to group DM
  2. Click on the Split bill preview (the one that failed)
  3. Scroll down to Merchant field

Expected Result:

Error message for merchant required should not appear, since merchant is not a requirement outside workspace expense

Actual Result:

Error message for merchant required is displayed

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

Bug6350857_1705947617846.bandicam_2024-01-22_14-14-46-634.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c87576e15c9b6373
  • Upwork Job ID: 1749514046195736576
  • Last Price Increase: 2024-01-23
  • Automatic offers:
    • s77rt | Reviewer | 28120335
    • paultsimura | Contributor | 28120336
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 22, 2024
@melvin-bot melvin-bot bot changed the title Split - Error message for merchant required is displayed on failed split in group DM [$500] Split - Error message for merchant required is displayed on failed split in group DM Jan 22, 2024
Copy link

melvin-bot bot commented Jan 22, 2024

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

Copy link

melvin-bot bot commented Jan 22, 2024

Triggered auto assignment to @michaelhaxhiu (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-split-p2p-chat-groups

@paultsimura
Copy link
Contributor

paultsimura commented Jan 22, 2024

Proposal

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

The Merchant Required error is shown for split requests outside of an Expense report.

What is the root cause of that problem?

We do not properly check if the request belongs to the Policy Expense Chat while showing the merchant error here:

brickRoadIndicator={shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''}
error={shouldDisplayMerchantError || (shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction)) ? translate('common.error.enterMerchant') : ''}

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

We should display this error only if the report belongs to the Expense Chat by adding a props.isPolicyExpenseChat check:

brickRoadIndicator={props.isPolicyExpenseChat && shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''}
error={shouldDisplayMerchantError || (props.isPolicyExpenseChat && shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction)) ? translate('common.error.enterMerchant') : ''}

This can be a bit simplified by moving this whole check into a separate variable and reusing it, but the general idea is the same.

We are making the same check on the MoneyRequestView here:

brickRoadIndicator={hasViolations('merchant') || (hasErrors && isEmptyMerchant && isPolicyExpenseChat) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''}
error={hasErrors && isPolicyExpenseChat && isEmptyMerchant ? translate('common.error.enterMerchant') : ''}

What alternative solutions did you explore? (Optional)

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Jan 23, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 23, 2024
Copy link

melvin-bot bot commented Jan 23, 2024

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

@youssef-lr youssef-lr changed the title [$500] Split - Error message for merchant required is displayed on failed split in group DM [$125] Split - Error message for merchant required is displayed on failed split in group DM Jan 23, 2024
Copy link

melvin-bot bot commented Jan 23, 2024

Upwork job price has been updated to $125

@paultsimura
Copy link
Contributor

@youssef-lr wouldn't it be fair to make the bounty for this one equal to the other almost identical issue – #33876? What's the difference between these 2 issues?

@youssef-lr
Copy link
Contributor

youssef-lr commented Jan 23, 2024

I think that bug is more important. Merchant is required when smartscan fails, especially in workspaces that are being actively used. Right now, P2P splits haven't really fully launched.

@s77rt
Copy link
Contributor

s77rt commented Jan 23, 2024

@paultsimura Thanks for the proposal. Your RCA is correct. The solution looks good to me.

🎀 👀 🎀 C+ reviewed
Link to proposal

Copy link

melvin-bot bot commented Jan 23, 2024

Triggered auto assignment to @cead22, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 24, 2024

📣 @paultsimura 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 24, 2024
@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #35112

@kadiealexander kadiealexander added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 1, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

Gonna move this to weekly while the PR is reviewed. Feel free to let me know if you'd prefer it stay daily.

@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels Feb 1, 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 Feb 2, 2024
@melvin-bot melvin-bot bot changed the title [$125] Split - Error message for merchant required is displayed on failed split in group DM [HOLD for payment 2024-02-09] [$125] Split - Error message for merchant required is displayed on failed split in group DM Feb 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

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

Copy link

melvin-bot bot commented Feb 2, 2024

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

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

Copy link

melvin-bot bot commented Feb 2, 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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] 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:
  • [@s77rt] 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:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] 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.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@s77rt
Copy link
Contributor

s77rt commented Feb 5, 2024

@Christinadobrzyn
Copy link
Contributor

Payouts due:

Contributor: $125 @paultsimura (in Upwork - https://www.upwork.com/nx/wm/offer/28120336)
Contributor+: $125 @s77rt (in Upwork - https://www.upwork.com/nx/wm/offer/28120335)

@melvin-bot melvin-bot bot added Daily KSv2 Monthly KSv2 Overdue and removed Weekly KSv2 labels Feb 9, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

@cead22, @paultsimura, @s77rt, @Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick!

@Christinadobrzyn
Copy link
Contributor

Sorry for the delay - paid out based on this payment summary - #34914 (comment)

It sounds like we don't need a regression test for this, correct @s77rt? If that's the case, I'll close this out. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@s77rt
Copy link
Contributor

s77rt commented Feb 12, 2024

@Christinadobrzyn Yes we can close this

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

No branches or pull requests

9 participants