You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Awaiting Payment - 22nd Dec] [$500] User Account Swapping Issue in IOU When Splitting Bills #31732
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?
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
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
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
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?
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.
📣 @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 📖
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:
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
Activity
[-]User Account Swapping Issue in IOU When Splitting Bills[/-][+][$500] User Account Swapping Issue in IOU When Splitting Bills[/+]melvin-bot commentedon Nov 22, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d923d8de5457372f
melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)abzokhattab commentedon Nov 22, 2023
cannot reproduce it on the latest main
dummy-1111 commentedon Nov 23, 2023
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 theSplitBillAndOpenReportAPI returns sortedparticiapantAccountIDsas you can see belowThis 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
accountIDorname(login) InMoneyRequestPreviewUpdate
App/src/components/ReportActionItem/MoneyRequestPreview.js
Line 154 in 4952c39
to
And use
sortedParticipantAvatarsinstead ofparticipantAvatarsResult
31732.mp4
What alternative solutions did you explore? (Optional)
trjExpensify commentedon Nov 23, 2023
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 commentedon Nov 26, 2023
@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 remaining items
melvin-bot commentedon Dec 3, 2023
📣 @allroundexperts Please request via NewDot manual requests for the Reviewer role ($500)
melvin-bot commentedon 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 📖
dummy-1111 commentedon Dec 3, 2023
@allroundexperts
PR is ready for review #32419
dummy-1111 commentedon Dec 15, 2023
Pay date here would be 22 Dec @robertjchen
allroundexperts commentedon Dec 19, 2023
Checklist
personalDetails->personalDetailsListmigration #20328Regression test
Verify that the order of avatars in the preview message does not change.
Do we 👍 or 👎 ?
trjExpensify commentedon 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:
[-][$500] User Account Swapping Issue in IOU When Splitting Bills[/-][+][Awaiting Payment - 22nd Dec] [$500] User Account Swapping Issue in IOU When Splitting Bills[/+]trjExpensify commentedon Jan 9, 2024
👋 @allroundexperts have you requested for this one?
allroundexperts commentedon Jan 9, 2024
Requested. Feel free to close!
robertjchen commentedon Jan 9, 2024
Thanks!
JmillsExpensify commentedon Jan 24, 2024
$500 payment to @allroundexperts based on this comment.