Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-06-03] Send invoice - Each workspace avatar in sender list has the same avatar #41385

Closed
6 tasks done
izarutskaya opened this issue May 1, 2024 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@izarutskaya
Copy link

izarutskaya commented May 1, 2024

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: 1.4.69-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User has a few workspaces with default and custom workspace name.
  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice.
  3. Enter amount and select a participant.
  4. Click on the workspace.

Expected Result:

Each workspace avatar is displayed correctly.

Actual Result:

Each workspace avatar in sender list has the same 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

Bug6467469_1714543804926.invoice_sender_avatar.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @adelekennedy
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels May 1, 2024
Copy link

melvin-bot bot commented May 1, 2024

Triggered auto assignment to @adelekennedy (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.

Copy link

melvin-bot bot commented May 1, 2024

Triggered auto assignment to @MonilBhavsar (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

github-actions bot commented May 1, 2024

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

@izarutskaya
Copy link
Author

@adelekennedy I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-bills

@izarutskaya
Copy link
Author

Production

image (12)

@ra-md
Copy link
Contributor

ra-md commented May 1, 2024

Proposal

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

Each workspace avatar in send invoice sender list has the same avatar

What is the root cause of that problem?

There is no policy ID in the activeAdminWorkspaces icons.

icons: [
{
source: policy?.avatar ? policy.avatar : ReportUtils.getDefaultWorkspaceAvatar(policy.name),
fallbackIcon: Expensicons.FallbackWorkspaceAvatar,
name: policy.name,
type: CONST.ICON_TYPE_WORKSPACE,
},
],

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

Add id: policy.id to the icons.

    icons: [
        {
            id: policy.id,
            source: policy?.avatar ? policy.avatar : ReportUtils.getDefaultWorkspaceAvatar(policy.name),
            fallbackIcon: Expensicons.FallbackWorkspaceAvatar,
            name: policy.name,
            type: CONST.ICON_TYPE_WORKSPACE,
        },
    ],

We also need to do the same in MoneyRequestConfirmationList.tsx

<MenuItem
    id={senderWorkspace?.id}
    key={translate('workspace.invoices.sendFrom')}
    shouldShowRightIcon={!isReadOnly && canUpdateSenderWorkspace}
    title={senderWorkspace?.name}
    icon={senderWorkspace?.avatar ? senderWorkspace?.avatar : getDefaultWorkspaceAvatar(senderWorkspace?.name)}
    iconType={CONST.ICON_TYPE_WORKSPACE}
    description={translate('workspace.common.workspace')}
    label={translate('workspace.invoices.sendFrom')}
    isLabelHoverable={false}
    interactive={!isReadOnly && canUpdateSenderWorkspace}
    onPress={() => {
        Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_SEND_FROM.getRoute(iouType, transaction?.transactionID ?? '', reportID, Navigation.getActiveRouteWithoutParams()));
    }}
    style={styles.moneyRequestMenuItem}
    labelStyle={styles.mt2}
    titleStyle={styles.flex1}
    disabled={didConfirm || !canUpdateSenderWorkspace}
/>

MenuItem.tsx

    <Avatar
        accountID={id}
        imageStyles={[styles.alignSelfCenter]}
        size={CONST.AVATAR_SIZE.DEFAULT}
        source={icon as AvatarSource}
        fallbackIcon={fallbackIcon}
        name={title}
        type={CONST.ICON_TYPE_WORKSPACE}
    />

What alternative solutions did you explore? (Optional)

N/A

@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment labels May 1, 2024
@MonilBhavsar
Copy link
Contributor

A minor UI issue not worth a blocker.
Have commented in the offending PR #39637 (comment)

@MonilBhavsar MonilBhavsar removed the Hourly KSv2 label May 1, 2024
@grgia
Copy link
Contributor

grgia commented May 1, 2024

@nkdengineer

@grgia
Copy link
Contributor

grgia commented May 1, 2024

@rushatgabhane this is a regression from #39637 (comment)

@rushatgabhane
Copy link
Member

Send invoice wasn't a thing back then 😭
Anyway, @nkdengineer could you please raise a PR

@MonilBhavsar
Copy link
Contributor

Send invoice wasn't a thing back then 😭

Hmm, Send Invoice PR is on production and this is on staging. So i wonder if it is the case 🤔

@nkdengineer
Copy link
Contributor

@MonilBhavsar @grgia I will raise the PR to fix this today. It's hard to keep track this bug because it's merged while my PR is in review.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 2, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 27, 2024
@melvin-bot melvin-bot bot changed the title Send invoice - Each workspace avatar in sender list has the same avatar [HOLD for payment 2024-06-03] Send invoice - Each workspace avatar in sender list has the same avatar May 27, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 27, 2024
Copy link

melvin-bot bot commented May 27, 2024

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

Copy link

melvin-bot bot commented May 27, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.75-1 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 2024-06-03. 🎊

Copy link

melvin-bot bot commented May 27, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@MonilBhavsar] The PR that introduced the bug has been identified. Link to the PR:
  • [@MonilBhavsar] 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:
  • [@MonilBhavsar] A discussion in #expensify-bugs 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:
  • [@MonilBhavsar] Determine if we should create a regression test for this bug.
  • [@MonilBhavsar] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@adelekennedy] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 2, 2024
Copy link

melvin-bot bot commented Jun 3, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@adelekennedy
Copy link

@MonilBhavsar @grgia I don't think any payment is due here, have I missed something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

7 participants