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

Split expense - Merchant field is shown as required while making split expense #41886

Closed
2 of 6 tasks
izarutskaya opened this issue May 9, 2024 · 14 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@izarutskaya
Copy link

izarutskaya commented May 9, 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.72-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on announce room
  3. Tap plus icon --- split expense
  4. Enter an amount and tap next

Expected Result:

Merchant field must not be shown as required while making split expense in announce room

Actual Result:

Merchant field is shown as required while making split expense in announce room

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

Bug6475535_1715233775422.split.mp4

View all open jobs on GitHub

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

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

Copy link

melvin-bot bot commented May 9, 2024

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

Copy link

melvin-bot bot commented May 9, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open Staging deploy checklist to see the list of PRs included in this release, then work quickly on the following:

  1. If you find which PR caused the issue/bug, you can reassign it to the person responsible for it.
    • If the author is OOO or won’t get online before the daily deploy is due, you are responsible for finding the best fix/path forward. Don’t hesitate to ask for help!
  2. Try to reproduce the issue, if the bug is on production, remove the DeployBlocker label but stay assigned to fix it (or find out which PR broke it to get help from the author).
    • You can adjust the urgency of the issue to better represent the gravity of the bug.
    • If the issue is super low priority, feel free to un-assign yourself.
    • Be careful with PHP warnings, sometimes it is more complex than just adding a null coalescing operator as they might be uncovering some bigger bug.
    • If it was a one-off issue that requires no action (for example, Bedrock was down or it is a duplicated issue), you can close it.

Remember rule #2: Never un-assign yourself from a real DeployBlocker unless you are 100% sure someone else is assigned and will take care of it.

@github-actions github-actions bot removed the Daily KSv2 label May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

👋 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.

@izarutskaya
Copy link
Author

@JmillsExpensify 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-split.

@izarutskaya
Copy link
Author

Production

Record_2024-05-09-12-01-33.mp4

@ShridharGoel
Copy link
Contributor

ShridharGoel commented May 9, 2024

Proposal

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

Split expense - Merchant field is shown as required while making split expense

What is the root cause of that problem?

isPolicyExpenseChat is false when creating a split expense normally, but it is true when using the #announce room.

const isMerchantRequired = isPolicyExpenseChat && (!isScanRequest || isEditingSplitBill) && shouldShowMerchant;

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

If we want to prevent merchant from being a required field for split expense, we can add a check in the isMerchantRequired field.

const isMerchantRequired = isPolicyExpenseChat && (!isScanRequest || isEditingSplitBill) && shouldShowMerchant && !isTypeSplit;

@cretadn22
Copy link
Contributor

record.mov

Let's examine the present scenario: when split bill in the expense report, an error regarding the required merchant field arises consistently. However, when splitting the bill in the announcement room, the error regarding the required merchant field appears and disappear after a moment

This flicker come from #40386.

@techievivek @JmillsExpensify, could you please verify the expected behavior regarding when and where the merchant field is required?

@techievivek
Copy link
Contributor

It seems that the merchant field is only mandatory in workspace chats. For non-workspace chats, it's only required when we explicitly scan a receipt and the scan is successful. However, for manual requests in non-workspace chats, it doesn't appear to be mandatory. I'll wait for confirmation from @JmillsExpensify. In any case, this issue doesn't seem to be a blocker, so I'll remove the label. Once Jason confirms, we can look into it further.

@techievivek techievivek added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels May 9, 2024
@cretadn22
Copy link
Contributor

regression from #41723

@youssef-lr
Copy link
Contributor

youssef-lr commented May 9, 2024

This is fixed in this PR #41945. The fix was that isPolicyExpenseChat should not be true when splitting from a workspace room. It should only be true if one of the participants is a policy expense chat.

@youssef-lr youssef-lr assigned youssef-lr and unassigned techievivek May 9, 2024
@melvin-bot melvin-bot bot added the Overdue label May 13, 2024
Copy link

melvin-bot bot commented May 13, 2024

@JmillsExpensify, @youssef-lr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@youssef-lr
Copy link
Contributor

This is fixed.

@melvin-bot melvin-bot bot removed the Overdue label May 15, 2024
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 Engineering
Projects
None yet
Development

No branches or pull requests

6 participants