Skip to content

[HOLD for payment 2023-06-28] [$1000] Web - Split Bill - Profile picture still shows avatar on a new split money page #20118

Closed

Description

@kbecciv

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. Open NewDot staging on web chrome.
  2. Create a workspace (if you don't already have one). Invite a second member to the workspace.
  3. Go to the workspace's announce room.
  4. Split a bill between the two workspace members.
  5. Click the bill split from within the announce room (so it opens the RHN with the details of the bill split.)
  6. Click the settings tab and change your profile image.
  7. Go back to the announce room, click into the bill split, and notice that your old profile image is display in the details page.

Expected Result:

Profile picture should be updated on a new split money page

Actual Result:

Profile picture still shows avatar on a new split money page

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: 1.3.22.0

Reproducible in staging?: n/a

Reproducible in production?: n/a

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

avatar.mp4

Expensify/Expensify Issue URL:

Issue reported by: @avi-shek-jha

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015e350d1e95099cb9
  • Upwork Job ID: 1665846988733915136
  • Last Price Increase: 2023-06-12

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 3, 2023
  2. melvin-bot commented on Jun 3, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 3, 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. dukenv0307 commented on Jun 3, 2023

    @dukenv0307
    Contributor

    Proposal

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

    Old Profile picture still shows avatar on a new split money page

    What is the root cause of that problem?

    The cause is we get payeePersonalDetails from participants that is converted to optionSelector from personalDetails with format here

    keyForList: details.login,
    login: details.login,
    text: details.displayName,
    firstName: lodashGet(details, 'firstName', ''),
    lastName: lodashGet(details, 'lastName', ''),
    alternateText: Str.isSMSLogin(details.login || '') ? LocalePhoneNumber.formatPhoneNumber(details.login) : details.login,
    icons: [
    {
    source: UserUtils.getAvatar(details.avatar, details.login),
    name: details.login,
    type: CONST.ICON_TYPE_AVATAR,
    },
    ],
    payPalMeAddress: lodashGet(details, 'payPalMeAddress', ''),
    phoneNumber: lodashGet(details, 'phoneNumber', ''),

    const payeePersonalDetails = _.filter(participants, (participant) => participant.login === reportAction.actorEmail)[0];

    While getIOUConfirmationOptionsFromPayeePersonalDetail fuction get data from fields that follow personalDetailsPropType.
    function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) {

    Because personalDetail.avatar and personalDetail.displayname is undefined, text is email or phone number instead of display name
    text: personalDetail.displayName ? personalDetail.displayName : personalDetail.login,

    and avatar is default avatar instead of current avatar
    source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.login),

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

    We have two solution to fix payee issue

    1. In SpliBillDetailPage, we get payeePersonalDetails from personalDetails instead of participants
      const payeePersonalDetails = _.filter(participants, (participant) => participant.login === reportAction.actorEmail)[0];
    2. In getIOUConfirmationOptionsFromPayeePersonalDetail function, we only need return personalDetail and other fields that we need because personalDetail now was converted to option
    return {
        ...personalDetail
        descriptiveText: amountText,
    };
    

    What alternative solutions did you explore? (Optional)

  5. GItGudRatio commented on Jun 3, 2023

    @GItGudRatio
    Contributor

    Proposal

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

    In this issue, we can notice that when we open the Split Bill Details Page, the payee's avatar is not shown correctly.

    What is the root cause of that problem?

    The root cause behind this issue is that the default avatar URL is passed to the avatar component instead of the user avatar.

    This happens because to get the payee's user details, we use the OptionsListUtils.getIOUConfirmationOptionsFromPayeePersonalDetail function. This uses the personalDetails.avatar to get the user's avatar. This is not correct because the payee's details in this.props.payeePersonalDetails are of the format:

    {
        "icons": [
            {
                "source": "https://d1wpcgnaa73g0y.cloudfront.net/0fb18190762aaf5fa9f5f91acd2b54a0bbc520f1_128.jpeg",
                "name": "...",
                "type": "avatar"
            }
        ],
        "payPalMeAddress": "",
        "phoneNumber": ""
    }
    

    const formattedPayeePersonalDetails = OptionsListUtils.getIOUConfirmationOptionsFromPayeePersonalDetail(
    this.getPayeePersonalDetails(),
    CurrencyUtils.convertToDisplayString(myIOUAmount, this.props.iou.selectedCurrencyCode),
    );

    source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.login),

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

    If there is no props.payeePersonalDetails, it fallbacks to this.props.currentUserPersonalDetails, which has the personalDetails.avatar property. A good way to fix this issue would be to use ternary operators to check if the property avatar exists on the personalDetails object, then use that property else look for icons[0].source or vice versa and pass that to the UserUtils.getAvatar accordingly.

    What alternative solutions did you explore? (Optional)

    Alternatively, we can modify the personal details prop to use avatar instead of the icons array.

    const payeePersonalDetails = _.filter(participants, (participant) => participant.login === reportAction.actorEmail)[0];

  6. joekaufmanexpensify commented on Jun 5, 2023

    @joekaufmanexpensify
    Contributor

    I can reproduce this. Interestingly, the profile image in the LHN and in the settings tab is also not updating right away after changing it. Although both do update after refreshing the session. Whereas the image on the bill split detailed page does not.

  7. joekaufmanexpensify commented on Jun 5, 2023

    @joekaufmanexpensify
    Contributor
    2023-06-05_18-15-42.mp4
  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed on Jun 5, 2023
  9. changed the title [-]Web - Split Bill - Profile picture still shows avatar on a new split money page[/-] [+][$1000] Web - Split Bill - Profile picture still shows avatar on a new split money page[/+] on Jun 5, 2023
  10. 59 remaining items

  11. joekaufmanexpensify commented on Jul 3, 2023

    @joekaufmanexpensify
    Contributor

    Not overdue. Pending being able to issue payment here.

  12. joekaufmanexpensify commented on Jul 5, 2023

    @joekaufmanexpensify
    Contributor

    Payment to rajat still on hold. Bumped in Slack.

  13. parasharrajat commented on Jul 5, 2023

    @parasharrajat
    Member

    @joekaufmanexpensify It will be better to make this weekly.

  14. joekaufmanexpensify commented on Jul 10, 2023

    @joekaufmanexpensify
    Contributor

    Still on hold

  15. joekaufmanexpensify commented on Jul 17, 2023

    @joekaufmanexpensify
    Contributor
  16. joekaufmanexpensify commented on Jul 24, 2023

    @joekaufmanexpensify
    Contributor

    Checking in on whether we are all set to pay this.

  17. joekaufmanexpensify commented on Jul 31, 2023

    @joekaufmanexpensify
    Contributor

    Bumped in Slack.

  18. parasharrajat commented on Aug 1, 2023

    @parasharrajat
    Member

    Payment requested. Ref: #20118 (comment)

  19. joekaufmanexpensify commented on Aug 2, 2023

    @joekaufmanexpensify
    Contributor

    Thanks! Copying the payment summary message here. No speed bonus here, so these are the relevant payments:

  20. joekaufmanexpensify commented on Aug 2, 2023

    @joekaufmanexpensify
    Contributor

    Closing for now, since all that's left is NewDot payment (which has been requested)!

  21. JmillsExpensify commented on Aug 2, 2023

    @JmillsExpensify
    Contributor

    Reviewed details for @parasharrajat. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions