You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-03-07] [$500] Workspaces - Сustom avatar is applied to all workspace rooms #35934
changed the title [-] Workspaces - Сustom avatar is applied to all workspace rooms[/-][+][$500] Workspaces - Сustom avatar is applied to all workspace rooms[/+]on Feb 6, 2024
where we can see that regardless of the WS room type, we're always getting the avatar source from the policy?.avatar and only in case that doesn't exist we fallback to getDefaultWorkspaceAvatar.
What changes do you think we should make in order to solve the problem?
Replace the logic within the WS room types check with the following:
essentially using only the part we need from the getWorkspaceIcon function.
What alternative solutions did you explore? (Optional)
Alternatively we can change the getWorkspaceIcon function by adding the check again something like:
Code spoiler
// ... rest of the functionletpolicyExpenseChatAvatarSource=allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar??getDefaultWorkspaceAvatar(workspaceName);if(isAdminRoom(report)||isAnnounceRoom(report)||isChatRoom(report)||isArchivedRoom(report)){policyExpenseChatAvatarSource=getDefaultWorkspaceAvatar(workspaceName);}// ... rest of the function
changed the title [-][$500] Workspaces - Сustom avatar is applied to all workspace rooms[/-][+][HOLD for payment 2024-03-07] [$500] Workspaces - Сustom avatar is applied to all workspace rooms[/+]on Feb 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] 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:
[@akinwale] 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:
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] 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.
[@anmurali / @muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
[-] Workspaces - Сustom avatar is applied to all workspace rooms[/-][+][$500] Workspaces - Сustom avatar is applied to all workspace rooms[/+]melvin-bot commentedon Feb 6, 2024
Job added to Upwork: https://www.upwork.com/jobs/~013fc2b5417b9e2c4a
melvin-bot commentedon Feb 6, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)melvin-bot commentedon Feb 6, 2024
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.lanitochka17 commentedon Feb 6, 2024
We think that this bug might be related to #wave6
CC @greg-schroeder
Tony-MK commentedon Feb 6, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspaces - Сustom avatar is applied to all workspace rooms
What is the root cause of that problem?
The
getWorkspaceIconfunction is being used for admin and announce rooms in thegetIconsfunction.App/src/libs/ReportUtils.ts
Lines 1543 to 1544 in 8563c0f
What changes do you think we should make in order to solve the problem?
We should use
getDefualtWorkspaceIconinstead for WS rooms which should only show the default workspace icon.ikevin127 commentedon Feb 8, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue
All WS rooms (including admins, announce) have the same new custom avatar.
What is the root cause of that problem?
Note
The WS rooms which should have default avatars: admin rooms, announce rooms, chat rooms and archived rooms.
Despite the fact that we check the WS room type here in the
getIconsfunction:App/src/libs/ReportUtils.ts
Line 1542 in 9f37d3e
The issue comes from the
getWorkspaceIconfunction which is called within the if mentioned above:App/src/libs/ReportUtils.ts
Lines 1443 to 1450 in 9f37d3e
where we can see that regardless of the WS room type, we're always getting the avatar source from the
policy?.avatarand only in case that doesn't exist we fallback togetDefaultWorkspaceAvatar.What changes do you think we should make in order to solve the problem?
Replace the logic within the WS room types check with the following:
Code spoiler
essentially using only the part we need from the
getWorkspaceIconfunction.What alternative solutions did you explore? (Optional)
Alternatively we can change the
getWorkspaceIconfunction by adding the check again something like:Code spoiler
Screenshots
MacOS: Chrome / Safari
akinwale commentedon Feb 8, 2024
Taking over as C+ here.
48 remaining items
aldo-expensify commentedon Feb 27, 2024
Next steps:
Pay C+ @akinwale and contributor @Tony-MK, and then we can close this out
[-][$500] Workspaces - Сustom avatar is applied to all workspace rooms[/-][+][HOLD for payment 2024-03-07] [$500] Workspaces - Сustom avatar is applied to all workspace rooms[/+]melvin-bot commentedon Feb 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 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-03-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 29, 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:
muttmuure commentedon Mar 7, 2024
Paying now
muttmuure commentedon Mar 7, 2024
Paid up, no regression test as it was reverted