Skip to content

Fix SplitBill flow #13378

Closed
Closed

Description

@luacmartins

Problem

Coming from this comment and this thread, there are a few inconsistencies with the Split Bill flow that we need to address:

  • Users should be able to deselect members when the split is initiated from an existing group Correct the logic for when bill split particpants can be selected #13279

  • Splits initiated from an existing group should always post the Split message to the respective group. Additionally, it should not create a separate group if users deselected participants. There's a limit of 9 participants in the selection.

Example:

  1. As memberA: create a groupDM with memberB, memberC & memberD
  2. Go to the “+” menu inside the groupDM > click “Split bill”
  3. Enter $100 > click Next
  4. Deselect memberD > click Split $100
  5. The split message from memberA is added to the groupDM: Split $100 with memberB and memberC
  6. In the memberA:memberB DM the request action from memberA is added: Requested $33.33 from memberB
  7. In the memberA:memberC DM the request action from memberA is added: Requested $33.33 from memberC
  8. In the memberA:memberD DM there is nothing added, as memberD was excluded from the split.
  • Similarly, a bill split initiated from within a policy room should add a split message to the room and create off-policy IOUs in each individual DM. There's no participant limit here.

  • When splitting a bill with a single participant, the split message should still be posted to the chat.

Example:

  1. As memberA, create a groupDM with memberB and memberC
  2. Go to the + menu inside the groupDM > click Split bill
  3. Enter $100 > click Next
  4. Deselect memberC > click Split $100
  5. The split message from memberA is added to the groupDM: Split $100 with memberB
  6. In the memberA:memberB DM the request action from memberA is added: Requested $50.00 from memberB
  7. In the memberA:memberC DM there is nothing added, as memberC was excluded from the split.

Why is this important?

It's the expected behavior for Split Bill flows

Solution

Fix the flow!

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0181093ec5c397a56b
  • Upwork Job ID: 1608288606003535872
  • Last Price Increase: 2022-12-29

Activity

  1. self-assigned this
    on Dec 6, 2022
  2. melvin-bot commented on Dec 16, 2022

    @melvin-bot

    @luacmartins Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  3. luacmartins commented on Dec 16, 2022

    @luacmartins
    ContributorAuthor

    PR in review!

  4. melvin-bot commented on Dec 26, 2022

    @melvin-bot

    @luacmartins Huh... This is 4 days overdue. Who can take care of this?

  5. melvin-bot commented on Dec 28, 2022

    @melvin-bot

    @luacmartins Still overdue 6 days?! Let's take care of this!

  6. mananjadhav commented on Dec 29, 2022

    @mananjadhav
    Collaborator

    @luacmartins Can you please assign someone to help with the payment of the issue?

  7. added
    InternalRequires API changes or must be handled by Expensify staff
    on Dec 29, 2022
  8. melvin-bot commented on Dec 29, 2022

    @melvin-bot
  9. melvin-bot commented on Dec 29, 2022

    @melvin-bot

    Current assignee @mananjadhav is eligible for the Internal assigner, not assigning anyone new.

  10. mallenexpensify commented on Dec 29, 2022

    @mallenexpensify
    Contributor

    @mananjadhav can you please accept the job and reply here once you have?
    https://www.upwork.com/jobs/~0181093ec5c397a56b

  11. mananjadhav commented on Dec 30, 2022

    @mananjadhav
    Collaborator
  12. mallenexpensify commented on Dec 30, 2022

    @mallenexpensify
    Contributor

    Paid @mananjadhav $1000

    @luacmartins we want regression test steps for this since it was a bug, right?

  13. luacmartins commented on Jan 4, 2023

    @luacmartins
    ContributorAuthor

    @mallenexpensify thanks for checking! Yes, we should update the Split Bill tests to match the new expected behavior as follows:

    No extra groups created

    1. As memberA: create a groupDM with memberB, memberC & memberD
    2. Go to the “+” menu inside the groupDM > click “Split bill”
    3. Enter $100 > click Next
    4. Deselect memberD > click Split $100
    5. The split message from memberA is added to the groupDM: Split $100 with memberB and memberC
    6. In the memberA:memberB DM the request action from memberA is added: Requested $33.33 from memberB
    7. In the memberA:memberC DM the request action from memberA is added: Requested $33.33 from memberC
    8. In the memberA:memberD DM there is nothing added, as memberD was excluded from the split.

    Splitting a bill with a single participant

    1. As memberA, create a groupDM with memberB and memberC
    2. Go to the + menu inside the groupDM > click Split bill
    3. Enter $100 > click Next
    4. Deselect memberC > click Split $100
    5. The split message from memberA is added to the groupDM: Split $100 with memberB
    6. In the memberA:memberB DM the request action from memberA is added: Requested $50.00 from memberB
    7. In the memberA:memberC DM there is nothing added, as memberC was excluded from the split.

    Split a bill from a policy room

    1. Create a Workspace + > New Workspace
    2. Navigate to Workspace > Manage members > Invite
    3. Invite 10 members to the policy
    4. In the announce room, select Split bill from the + icon inside the chat
    5. Verify that there's a split message added to the room and no additional group chats are created
  14. mallenexpensify commented on Jan 4, 2023

    @mallenexpensify
    Contributor

    Thanks @luacmartins, For No extra groups created and Splitting a bill with a single participant the current steps listed here are below. #9 has an abbreviated version of what you recommend, do you think it's good enough to leave as is?

    1. Click the + icon in a Group conversation
    2. Verify the create menu appears with the two options: Add Attachment and Split Bill
    3. Tap/click outside of the create menu and Verify that it closes the modal
    4. Open the DM create menu (note below) again and select Split Bill
    5. Verify that the big number pad (BNP) page appears next
    6. Enter an amount into the BNP and select the Next confirmation button
    7. Verify that the next screen you see is the final Split Bill confirmation screen
    8. Verify that all the participants of the Group DM are populated under the Who was there? header
    9. Verify you can select and deselect the participants of the IOU and that the amounts adjust accordingly with the actions

    I think we need a whole new test for Split a bill from a policy room

  15. luacmartins commented on Jan 4, 2023

    @luacmartins
    ContributorAuthor

    @mallenexpensify I think that we need new tests for all scenarios, since they are distinct from the steps you linked.

  16. luacmartins commented on Jan 5, 2023

    @luacmartins
    ContributorAuthor

    Created a regression test issue here. I believe that we are all done here. Closing.

  17. mallenexpensify commented on Jan 6, 2023

    @mallenexpensify
    Contributor

    Thanks @luacmartins. I'm still learning the details on the regression test steps.
    How often do you think the test steps listed in the PR will align with the test steps added to TestRail? I wonder if it's best practice for BZ to review and possibly use those steps instead of starting from scratch each time.

  18. luacmartins commented on Jan 6, 2023

    @luacmartins
    ContributorAuthor

    I'd say that the QA steps listed in the PR should almost always align with what is on TestRail. We are asking Applause to test the PR with those steps once after all, so this should be the case during regression tests too. We just need to make sure that the steps fit in with the other existing steps if we are updating an existing test case though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions