Skip to content

[Awaiting Payment - 22nd Dec] [$500] User Account Swapping Issue in IOU When Splitting Bills #31732

Closed

Description

@lanitochka17

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.2-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:
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:

1, Navigate to FAB
2, Select "Request Money."
3, Enter the desired amount
4, Add the recipient's email
5, Enable the "Add Split" option

Expected Result:

The user profile should not be swapped

Actual Result:

The user profile is swapped when splitting a bill in IOU between two users

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

Bug6287208_1700660684896.swapped.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d923d8de5457372f
  • Upwork Job ID: 1727385176024190976
  • Last Price Increase: 2023-11-29
  • Automatic offers:
    • s-alves10 | Contributor | 27935989

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 22, 2023
  2. changed the title [-]User Account Swapping Issue in IOU When Splitting Bills[/-] [+][$500] User Account Swapping Issue in IOU When Splitting Bills[/+] on Nov 22, 2023
  3. melvin-bot commented on Nov 22, 2023

    @melvin-bot
  4. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 22, 2023
  6. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  8. abzokhattab commented on Nov 22, 2023

    @abzokhattab
    Contributor

    cannot reproduce it on the latest main

  9. dummy-1111 commented on Nov 23, 2023

    @dummy-1111
    Contributor

    Proposal

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

    User avatars are swapped in IOU preview when splitting bills

    What is the root cause of that problem?

    When splitting a bill, users are added in order they are selected. In that order, they are displayed in MoneyRequestPreview. But the SplitBillAndOpenReport API returns sorted particiapantAccountIDs as you can see below
    image

    This is the root cause

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

    We can show the participants avatars sorted by its accountID or name(login) In MoneyRequestPreview
    Update

    const participantAvatars = OptionsListUtils.getAvatarsForAccountIDs(participantAccountIDs, props.personalDetails);

    to

        const participantAvatars = OptionsListUtils.getAvatarsForAccountIDs(participantAccountIDs, props.personalDetails);
        const sortedParticipantAvatars = _.sortBy(participantAvatars, (avatar) => avatar.name);
        // const sortedParticipantAvatars = _.sortBy(participantAvatars, (avatar) => avatar.id);
    

    And use sortedParticipantAvatars instead of participantAvatars

    Result
    31732.mp4

    What alternative solutions did you explore? (Optional)

  10. trjExpensify commented on Nov 23, 2023

    @trjExpensify
    Contributor

    Very interesting! It's pretty minor, but I agree it's a little jarring to see the switch around because of the default avatars changing completely. Is it not possible to keep the same selected order on the split preview?

  11. allroundexperts commented on Nov 26, 2023

    @allroundexperts
    Contributor

    Very interesting! It's pretty minor, but I agree it's a little jarring to see the switch around because of the default avatars changing completely. Is it not possible to keep the same selected order on the split preview?

    @trjExpensify It's definitely possible but we'll need to change this from the backend then. I think its better to standardise this by sorting the results. As such, what @s-alves10 proposed above looks like a better solution IMO.

  12. 12 remaining items

  13. melvin-bot commented on Dec 3, 2023

    @melvin-bot

    📣 @allroundexperts Please request via NewDot manual requests for the Reviewer role ($500)

  14. melvin-bot commented on Dec 3, 2023

    @melvin-bot

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

  15. dummy-1111 commented on Dec 3, 2023

    @dummy-1111
    Contributor

    @allroundexperts

    PR is ready for review #32419

  16. dummy-1111 commented on Dec 15, 2023

    @dummy-1111
    Contributor

    Pay date here would be 22 Dec @robertjchen

  17. allroundexperts commented on Dec 19, 2023

    @allroundexperts
    Contributor

    Checklist

    1. Continue personalDetails -> personalDetailsList migration #20328
    2. https://github.com/Expensify/App/pull/20328/files#r1431287393
    3. N/A
    4. A regression test would be helpful.

    Regression test

    1. Click on the FAB -> Request Money -> Enter amount & recipient -> Submit
    2. On the screen that opens, observe the IOU preview message.

    Verify that the order of avatars in the preview message does not change.

    Do we 👍 or 👎 ?

  18. trjExpensify commented on Dec 19, 2023

    @trjExpensify
    Contributor

    As this was caught by Applause in the regression testing and there's one to cover this flow, I don't think we need a new dedicated one for it personally.

    Updating the title to note the 22nd as the payment date. Confirming those payments will be:

    • $500 to @allroundexperts for the C+ review
    • $500 to @s-alves10 for the fix - paid
  19. changed the title [-][$500] User Account Swapping Issue in IOU When Splitting Bills[/-] [+][Awaiting Payment - 22nd Dec] [$500] User Account Swapping Issue in IOU When Splitting Bills[/+] on Dec 19, 2023
  20. trjExpensify commented on Jan 9, 2024

    @trjExpensify
    Contributor

    👋 @allroundexperts have you requested for this one?

  21. allroundexperts commented on Jan 9, 2024

    @allroundexperts
    Contributor

    Requested. Feel free to close!

  22. robertjchen commented on Jan 9, 2024

    @robertjchen
    Contributor

    Thanks!

  23. JmillsExpensify commented on Jan 24, 2024

    @JmillsExpensify
    Contributor

    $500 payment to @allroundexperts based on this comment.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions