Skip to content

[HOLD for payment 2023-12-12] Task - Assignee with custom avatar shows default avatar in the task report #31028

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: .3.96-5
Reproducible in staging?: Y
Reproducible in production?: N
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:

Issue found when executing PR #30515

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Go to chat with user that has a custom avatar
  3. Click + > Assign task
  4. Create a task and assign the same user in Step 1 as assignee
  5. Open the task report

Expected Result:

The assignee in the task report shows the custom avatar

Actual Result:

The assignee in the task report shows the default avatar instead of the custom avatar

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

Bug6267894_1699387235985.20231108_033932.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 7, 2023
  2. melvin-bot commented on Nov 7, 2023

    @melvin-bot

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

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

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. melvin-bot commented on Nov 7, 2023

    @melvin-bot

    Triggered auto assignment to @Li357 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  6. abzokhattab commented on Nov 7, 2023

    @abzokhattab
    Contributor

    Proposal

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

    Task asignee with custom avator shows the default avatar in the task report view

    What is the root cause of that problem?

    in the following line, the props.personalDetails is undefined because we dont connect to onyx to get the personal details object:

    icon={OptionsListUtils.getAvatarsForAccountIDs([props.report.managerID], props.personalDetails)}

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

    either by adding:

        const personalDetails = usePersonalDetails() ?? CONST.EMPTY_OBJECT;

    and update the line above to use this const

    OR by connecting to the onyx in the component:

         withOnyx({
             personalDetails: {
                 key: ONYXKEYS.PERSONAL_DETAILS_LIST,
             },
         }),

    Or alternatively we add those in the withCurrentUserPersonalDetails hoc

  7. dukenv0307 commented on Nov 8, 2023

    @dukenv0307
    Contributor

    Proposal

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

    Assignee with custom avatar shows default avatar in the task report

    What is the root cause of that problem?

    #30354

    In this PR we remove personalDetails from Onyx and use hook to get this. And then we don't pass this to WrappedComponent

    const personalDetails = usePersonalDetails() ?? CONST.EMPTY_OBJECT;

    That makes props.personalDetails is undefined and then default avatar is displayed

    const assigneeTooltipDetails = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs([props.report.managerID], props.personalDetails), false);

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

    1. If we don't want to pass personalDetails from withCurrentUserPersonalDetails to WrappedComponent, we should search all pages that are using this HOC and replace props.personalDetails with usePersonalDetails() hook

    2. We should pass personalDetails to WrappedComponent in withCurrentUserPersonalDetails HOC

    const personalDetails = usePersonalDetails() ?? CONST.EMPTY_OBJECT;

    What alternative solutions did you explore? (Optional)

  8. isabelastisser commented on Nov 8, 2023

    @isabelastisser
    Contributor

    Hey @Li357, what's the next step here? Did you review the proposals above? Thanks!

  9. 24 remaining items

  10. isabelastisser commented on Dec 8, 2023

    @isabelastisser
    Contributor

    Not overdue, payment on Dec 12.

  11. isabelastisser commented on Dec 11, 2023

    @isabelastisser
    Contributor

    @abzokhattab, can you please complete the checklist above?

    Payment is due tomorrow.

  12. abzokhattab commented on Dec 12, 2023

    @abzokhattab
    Contributor

    Hi @isabelastisser I guess you meant @Li357 right?

  13. isabelastisser commented on Dec 13, 2023

    @isabelastisser
    Contributor

    Hey @abzokhattab, @Li357 is no longer working for Expensify. Can you please complete the checklist? Thanks!

  14. isabelastisser commented on Dec 13, 2023

    @isabelastisser
    Contributor

    Offer sent in Upwork.

  15. abzokhattab commented on Dec 13, 2023

    @abzokhattab
    Contributor

    Thanks @isabelastisser I don't think we need a regression test for this as the changes included minor refactoring.

  16. isabelastisser commented on Dec 14, 2023

    @isabelastisser
    Contributor

    Sounds good. All set!

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.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions