Skip to content

[HOLD for overpayment refund] [$1000] Web - Duplicate particpant name and avatar at the top of the Money request message. #25819

Closed

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login as User A and User B in front of you at the same time.
  2. As User A Open User B chat and request money( make sure it works by avoiding the bugs around IOU feature Now )
  3. As User B Open the same chat and request money from User A.

Expected Result:

Both Patticpants names and avatars should be displayed at the top of the Money request message.

Actual Result:

Duplicate particpant name and avatar ( User A name and avatar ) at the top of the Money request message

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.57-0

Reproducible in staging?: Y

Reproducible in production?:

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

Notes/Photos/Videos: Any additional supporting documentation

Screencast.From.14-08-23.19.38.44.mp4
Recording.1312.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Ahmed-Abdella

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692033869443169

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fc2d76b91c3cdcd1
  • Upwork Job ID: 1696679786881073152
  • Last Price Increase: 2023-09-20
  • Automatic offers:
    • jjcoffee | Reviewer | 26790515
    • hungvu193 | Contributor | 26790518
    • Ahmed-Abdella | Reporter | 26790520

Activity

  1. added
    Daily
    Bug
    on Aug 24, 2023
  2. melvin-bot commented on Aug 24, 2023

    @melvin-bot

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

  3. melvin-bot commented on Aug 24, 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
  4. spcheema commented on Aug 24, 2023

    @spcheema
    Contributor

    Proposed solution

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

    Web - Duplicate the participant's name and avatar at the top of the Money request message.

    What is the root cause of that problem?**

    Here is the explanation:

    When User A requests money then an IOU (XX) report requested A$1.00 is sent to User B

    So both avatars are visible on each side. The first avatar action.actorAccountID is User B and the secondary avatar is the IOU report owner (User A)

    Now User B requests the money then action.actorAccountID changed with User B

    The first avatar action.actorAccountID (which is now B) and the secondary avatar is the IOU report owner (User B) are the same.

    if (displayAllActors) {
    const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {};
    const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', '');
    displayName = `${primaryDisplayName} & ${secondaryDisplayName}`;
    secondaryAvatar = {
    source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID),
    type: CONST.ICON_TYPE_AVATAR,
    name: secondaryDisplayName,
    id: props.iouReport.ownerAccountID,
    };
    } else if (!isWorkspaceActor) {

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

    To fix this issue we need to check if it's an iou report then use the associated report owner and manager ID similar to participants list page https://github.com/Expensify/App/blob/main/src/pages/ReportParticipantsPage.js#L61

    Updated code will be like:

    If actor is same owner then user manage ID

    What alternative solutions did you explore? (Optional)

    N/A

  5. hungvu193 commented on Aug 24, 2023

    @hungvu193
    Contributor

    Proposal

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

    Web - Duplicate participant name and avatar at the top of the Money request message.

    What is the root cause of that problem?

    We're always getting the second user detail from ownerAccountID here:

    const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {};
    const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', '');

    So when the ownerAccountID is also the person who request the money, it will cause this issue, because now the secondaryUserDetails is also the currentUserDetails.

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

    We should add a new condition to identify the secondaryUserId:

    const secondaryAccountId = props.iouReport.ownerAccountID === actorAccountID ? props.iouReport.managerID : props.iouReport.ownerAccountID;

    Then use it below:

        if (displayAllActors) {
            const secondaryUserDetails = props.personalDetailsList[secondaryAccountId] || {};
            const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', '');
            displayName = `${primaryDisplayName} & ${secondaryDisplayName}`;
            secondaryAvatar = {
                source: UserUtils.getAvatar(secondaryUserDetails.avatar, secondaryAccountId),
                type: CONST.ICON_TYPE_AVATAR,
                name: secondaryDisplayName,
                id: secondaryAccountId,
            };
        }

    What alternative solutions did you explore? (Optional)

  6. melvin-bot commented on Aug 29, 2023

    @melvin-bot

    @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

  7. added
    External
    on Aug 30, 2023
  8. changed the title [-]Web - Duplicate particpant name and avatar at the top of the Money request message.[/-] [+][$1000] Web - Duplicate particpant name and avatar at the top of the Money request message.[/+] on Aug 30, 2023
  9. melvin-bot commented on Aug 30, 2023

    @melvin-bot
  10. added
    Help Wanted
    on Aug 30, 2023
  11. melvin-bot commented on Aug 30, 2023

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.

  12. melvin-bot commented on Aug 30, 2023

    @melvin-bot

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

  13. 88 remaining items

  14. hayata-suenaga commented on Oct 23, 2023

    @hayata-suenaga
    Contributor

    As @situchan suggested, theres seem to be a regression from this PR. @jjcoffee if you don't think otherwise, I think we can consider that a regression happened.

  15. jjcoffee commented on Oct 23, 2023

    @jjcoffee
    Contributor

    @hayata-suenaga Ohh my apologies, I thought I wasn't able to repro with just our PR, but actually I misunderstood this comment as meaning that the behaviour was happening for manual requests too, but apparently it was only for distance + scans. Agree now that there was indeed a regression. Sorry for the confusion!

  16. mallenexpensify commented on Oct 23, 2023

    @mallenexpensify
    Contributor

    Ok, I'm updating the above for payment to account for the regression and removing the urgency bonus (per CONTRIBUTING.md )

    the assigned Contributor and Contributor+ are not eligible for the 50% urgency bonus

    I've requested refunds of $1k from @hungvu193 and @jjcoffee , will leave this issue open til I confirm the funds have been refunded.

  17. jjcoffee commented on Oct 24, 2023

    @jjcoffee
    Contributor

    Will need a few days before my account gets topped back up enough to issue the refund. Sorry about this mess!

  18. hayata-suenaga commented on Oct 26, 2023

    @hayata-suenaga
    Contributor

    Melvin, we're waiting for the refound

  19. changed the title [-][HOLD for payment 2023-10-09] [$1000] Web - Duplicate particpant name and avatar at the top of the Money request message.[/-] [+][HOLD for overpayment refund] [$1000] Web - Duplicate particpant name and avatar at the top of the Money request message.[/+] on Oct 26, 2023
  20. jjcoffee commented on Oct 30, 2023

    @jjcoffee
    Contributor

    @mallenexpensify Refunded! 🙇

  21. mallenexpensify commented on Oct 30, 2023

    @mallenexpensify
    Contributor

    Thanks @jjcoffee and @hungvu193, confirming the refunds and that the total payment was $500 each.

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions