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

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

Closed
6 tasks done
lanitochka17 opened this issue Nov 22, 2023 · 25 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@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 Nov 22, 2023
@melvin-bot melvin-bot bot changed the title User Account Swapping Issue in IOU When Splitting Bills [$500] User Account Swapping Issue in IOU When Splitting Bills Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

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

Copy link

melvin-bot bot commented Nov 22, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

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

Copy link

melvin-bot bot commented Nov 22, 2023

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

@abzokhattab
Copy link
Contributor

cannot reproduce it on the latest main

@s-alves10
Copy link
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)

@trjExpensify
Copy link
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?

@allroundexperts
Copy link
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.

@trjExpensify
Copy link
Contributor

But does that mean the order will not match the confirmation page order though? and they still switch around?

@allroundexperts
Copy link
Contributor

It will match the one coming from backend. And the switch won't happen.

Copy link

melvin-bot bot commented Nov 29, 2023

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

@trjExpensify
Copy link
Contributor

It will match the one coming from backend. And the switch won't happen.

Great, so that's good then!

@allroundexperts
Copy link
Contributor

Given we have an agreement, I think we are good to go with @s-alves10's proposal.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 29, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Dec 2, 2023
@robertjchen
Copy link
Contributor

Yep, this approach makes sense to me! 👍

@melvin-bot melvin-bot bot removed the Overdue label Dec 3, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 3, 2023
Copy link

melvin-bot bot commented Dec 3, 2023

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

Copy link

melvin-bot bot commented Dec 3, 2023

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

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Dec 3, 2023
@s-alves10
Copy link
Contributor

@allroundexperts

PR is ready for review #32419

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Dec 3, 2023
@s-alves10
Copy link
Contributor

Pay date here would be 22 Dec @robertjchen

@allroundexperts
Copy link
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 👎 ?

@trjExpensify
Copy link
Contributor

trjExpensify commented Dec 19, 2023

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:

@trjExpensify trjExpensify 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 Dec 19, 2023
@trjExpensify
Copy link
Contributor

👋 @allroundexperts have you requested for this one?

@allroundexperts
Copy link
Contributor

Requested. Feel free to close!

@robertjchen
Copy link
Contributor

Thanks!

@JmillsExpensify
Copy link

$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
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants