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

[ON HOLD] [MEDIUM] [Splits] [$250] Split bill - Split amount is lost when adding receipt and splitting bill #37491

Open
5 of 6 tasks
izarutskaya opened this issue Feb 29, 2024 · 90 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 29, 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: v1.4.45-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): natnael.expensify+3@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal Team

Action Performed:

  1. Click on 'FAB' > Request money > enter amount
  2. Select a user > Add receipt > return to where you can select a user
  3. Click on 'Split' button
  4. Click on 'Add to split' > click on 'Split'

Expected Result:

Entered amount shouldn't be lost, and request shouldn't change to scan request

Actual Result:

Entered amount is lost and request is changed to a scan request

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

Bug6396788_1709201886587.Screen_Recording_2024-02-29_at_10.49.14_in_the_morning.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e554328af9becb46
  • Upwork Job ID: 1763525709189742592
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • shubham1206agra | Reviewer | 0
    • rojiphil | Contributor | 0
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

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

@izarutskaya izarutskaya added the DeployBlockerCash This issue or pull request should block deployment label Feb 29, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 29, 2024
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.

Copy link

melvin-bot bot commented Feb 29, 2024

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

@izarutskaya
Copy link
Author

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

@grgia
Copy link
Contributor

grgia commented Feb 29, 2024

I believe this is happening with manual requests too

@rojiphil
Copy link
Contributor

rojiphil commented Feb 29, 2024

Proposal

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

When Split bill is used with a receipt, the split amount is lost in the split bill details page.

What is the root cause of that problem?

Here, when we split the bill with a receipt, it was thought to be done via the scan tab where we do not enter the amount. In such a case, the flow starts with a split bill request and is completed later. However, as done in this issue, it is also possible to split the bill via Manual request with an added receipt. Currently, this goes through the default startSplit flow. This is the root cause.

I do not think this is a regression.

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

We can support split bill request for manual request type with receipt by making use of the splitBill here and splitBillAndOpenReport here.

  1. First, we need to avoid going through the startSplitBill flow by additionally checking for a valid amount like this here

         if (iouType === CONST.IOU.TYPE.SPLIT && receiptFile && transaction.amount === 0) {
    
  2. Now, the flow with either go through splitBill here or splitBillAndOpenReport here. Here, let us pass the receiptFile into splitBill and splitBillAndOpenReport as it is done here.

  3. Inside the createSplitsAndOnyxData here, generate the receiptObject like it is done here and add this to the transaction here and iou report action here. Further, we need to add the receipt to one-to-one iou report actions and transactions too here. Also, failure data can consider receipt error using getReceiptError like here

However, this would also need BE support as SplitBill API need to send back receipt in response.

What alternative solutions did you explore? (Optional)

Alternatively, if we want to do this via startSplitBill flow, we can include amount in the flow. Here, I think even BE needs to ensure that transaction contains the amount. Happy to explore more on this if we want to go through this approach.

@puneetlath
Copy link
Contributor

FYI, this is likely fixed by this revert. Will have QA re-test once it is CP'd.

@puneetlath
Copy link
Contributor

Looks like that revert ^ didn't fix the issue. So we still need to figure out what is going on here @grgia.

@situchan
Copy link
Contributor

Another regression from #33482
Not able to reproduce after reverting that PR locally

@youssef-lr
Copy link
Contributor

@situchan if you revert that PR you will not be able to split with a single user, which is why you can't reproduce this. I think this is not a regression as @rojiphil mentioned. Confirming shortly.

@situchan
Copy link
Contributor

ok, if this bug happens on production when split bill with workspace (not single user), not blocker.

@youssef-lr
Copy link
Contributor

if this bug happens on production when split bill with workspace (not single user)

have you tested this?

@situchan
Copy link
Contributor

checking

@youssef-lr
Copy link
Contributor

youssef-lr commented Feb 29, 2024

we can't test that scenario in prod, because the PR that fixes detecting 'Split' from the route is only in staging. Notice how the request never becomes a split.

Screen.Recording.2024-02-29.at.22.09.51.mov

@youssef-lr
Copy link
Contributor

@bernhardoj I think this is an edge case we missed, do you mind taking a look?

@situchan
Copy link
Contributor

we can't test that scenario in prod, because the PR that fixes detecting 'Split' from the route is only in staging. Notice how the request never becomes a split.

👍

@youssef-lr
Copy link
Contributor

I think demoting is fine here.

@youssef-lr youssef-lr added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 29, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 25, 2024
@youssef-lr
Copy link
Contributor

@rojiphil are you able to work on this soon?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2024
@rojiphil
Copy link
Contributor

are you able to work on this soon?

Lot to unpack here but, yes, will pick this up today in some time.

@isabelastisser
Copy link
Contributor

@rojiphil can you please provide an update? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2024
@rojiphil
Copy link
Contributor

can you please provide an update? Thanks!

The current status is that @youssef-lr is taking a look (mentioned here) at any needed BE changes for this feature based on the FE changes made thus far in a draft PR

@melvin-bot melvin-bot bot added the Overdue label Jul 22, 2024
@youssef-lr
Copy link
Contributor

I haven't had time to prioritize this yet, I'm on it next week.

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 1, 2024
@isabelastisser
Copy link
Contributor

Not overdue. Any updates, @youssef-lr? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Aug 2, 2024
@youssef-lr
Copy link
Contributor

No update yet @isabelastisser :/, I'm focusing on Aug 15th issues

Copy link

melvin-bot bot commented Aug 8, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@shubham1206agra
Copy link
Contributor

@rojiphil @youssef-lr Bump on the status here.

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 20, 2024
@isabelastisser
Copy link
Contributor

Any updates here @youssef-lr ? thanks!

@melvin-bot melvin-bot bot removed the Overdue label Aug 20, 2024
@youssef-lr
Copy link
Contributor

I think we can put this on monthly for as long as vip-split is paused

@youssef-lr youssef-lr added Monthly KSv2 and removed Weekly KSv2 labels Aug 20, 2024
@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
@isabelastisser isabelastisser changed the title [MEDIUM] [Splits] [$250] Split bill - Split amount is lost when adding receipt and splitting bill [ON HOLD] [MEDIUM] [Splits] [$250] Split bill - Split amount is lost when adding receipt and splitting bill Sep 23, 2024
@isabelastisser
Copy link
Contributor

vip-split is paused; issue is on hold.

@melvin-bot melvin-bot bot removed the Overdue label Sep 23, 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. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2
Projects
None yet
Development

No branches or pull requests