Skip to content

[Due for payment 2025-05-13] [$250] Send invoice - Both workspace avatar has the same avatar letter #60521

Closed

Description

@mitarachim

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: v9.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #60346
Email or phone of affected tester (no customers): testpayment935@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 10 /Chrome,Samsung Galaxy s10/ Chrome,Samsung Galaxy s10/ Android 12
App Component: Other

Action Performed:

Precondition:

[User A] has a workspace with invoicing enabled.
[User B] does not have any workspace.
[User A] and [User B] do not have chat history with each other.

  1. [User A] Send an invoice to User B.
  2. [User B] Go to invoice in the chat.
  3. [User B] Click Pay.
  4. [User B] Click Pay as business > Pay elsewhere.
  5. [User B] Open the workspace avatar for both Workspace from detail page

Expected Result:

Each workspace avatar have their own letters

Actual Result:

Both workspace avatar has the same avatar letter only background color different

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6806768_1745014077852.bandicam_2025-04-19_00-49-15-958.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021914708478350611886
  • Upwork Job ID: 1914708478350611886
  • Last Price Increase: 2025-04-22
  • Automatic offers:
    • linhvovan29546 | Contributor | 107094656
Issue OwnerCurrent Issue Owner: @lydiabarclay

Activity

  1. added
    Bug
    Daily
    on Apr 19, 2025
  2. melvin-bot commented on Apr 19, 2025

    @melvin-bot

    Triggered auto assignment to @lydiabarclay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. linhvovan29546 commented on Apr 19, 2025

    @linhvovan29546
    Contributor

    Proposal

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

    Send invoice - Both workspace avatar has the same avatar letter

    What is the root cause of that problem?

    Currently, we retrieve the avatar source based on the report, and the policy is undefined, which leads to an incorrect avatar letter. This happens because we fall back to using the policy from the report.

    source: UserUtils.getFullSizeAvatar(ReportUtils.getWorkspaceIcon(report).source, 0),

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

    We should pass the policy as the second parameter to the getWorkspaceIcon function, similar to how it's done in other places.

    const attachment = useMemo(() => {
    if (ReportUtils.isGroupChat(report) && !ReportUtils.isThread(report)) {
    return {
    source: report?.avatarUrl ? UserUtils.getFullSizeAvatar(report.avatarUrl, 0) : ReportUtils.getDefaultGroupAvatar(report?.reportID),
    headerTitle: ReportUtils.getReportName(report),
    isWorkspaceAvatar: false,
    };
    }
    return {
    source: UserUtils.getFullSizeAvatar(ReportUtils.getWorkspaceIcon(report).source, 0),
    headerTitle: ReportUtils.getPolicyName({report, policy}),
    // In the case of default workspace avatar, originalFileName prop takes policyID as value to get the color of the avatar
    originalFileName: policy?.originalFileName ?? policy?.id ?? report?.policyID,
    isWorkspaceAvatar: true,
    };
    }, [report, policy]);

                source: UserUtils.getFullSizeAvatar(ReportUtils.getWorkspaceIcon(report,policy).source, 0),

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We already have unit tests for getWorkspaceIcon, so I don't think additional tests are necessary in this case. We can render ReportAvatar then assert avatar correct

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. brunovjk commented on Apr 21, 2025

    @brunovjk
    Contributor

    @rezkiy37 Do you have any idea what might be causing this issue? I'm away from the office to check if it was caused by our PR. I'll investigate on Monday

  5. rezkiy37 commented on Apr 22, 2025

    @rezkiy37
    Contributor

    @brunovjk, I don't think it is associated with the PR. I guess this is an old bug that was found recently. So I would let other devs fix it as a usual bug.

  6. melvin-bot commented on Apr 22, 2025

    @melvin-bot

    @lydiabarclay Whoops! This issue is 2 days overdue. Let's get this updated quick!

  7. added
    External
    on Apr 22, 2025
  8. changed the title [-]Send invoice - Both workspace avatar has the same avatar letter[/-] [+][$250] Send invoice - Both workspace avatar has the same avatar letter[/+] on Apr 22, 2025
  9. melvin-bot commented on Apr 22, 2025

    @melvin-bot
  10. added
    Help Wanted
    on Apr 22, 2025
  11. melvin-bot commented on Apr 22, 2025

    @melvin-bot

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

  12. 21 remaining items

  13. melvin-bot commented on May 6, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. removed
    Reviewing
    on May 6, 2025
  15. melvin-bot commented on May 6, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.39-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-05-13. 🎊

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on May 6, 2025

    @melvin-bot

    @ahmedGaber93 @lydiabarclay @ahmedGaber93 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. lydiabarclay commented on May 14, 2025

    @lydiabarclay
    Contributor

    @ahmedGaber93 it looks like this one fell off the radar last week, apologies. Would you please fill out the above checklist as soon as you can?

  18. ahmedGaber93 commented on May 15, 2025

    @ahmedGaber93
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other: edge case that are difficult to notice

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other: Applause Internal Team
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: None. This is a very deeply edge case, so no offending PR.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A.

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/501345

    Regression Test Proposal

    Test:

    1. [User A] Send an invoice to User B.
    2. [User B] Open the invoice from the chat.
    3. [User B] Click Pay.
    4. [User B] Select Pay as business > Pay elsewhere.
    5. [User B] Open the workspace avatar for both workspaces from the invoice "Details" page.
    6. Verify that the avatars are displayed correctly.

    Do we agree 👍 or 👎

  19. ahmedGaber93 commented on May 15, 2025

    @ahmedGaber93
    Contributor

    @lydiabarclay checklist is completed. Sorry for the delay 🙏.

  20. lydiabarclay commented on May 15, 2025

    @lydiabarclay
    Contributor

    Payment Summary

    Contributor: @linhvovan29546 paid $250 via Upwork
    Contributor+: @ahmedGaber93 due $250 via NewDot

    ✅ Regression test filed

  21. JmillsExpensify commented on Jul 11, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @ahmedGaber93

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions