-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[HOLD for Payment 2024-09-24][$250] Invoice - Default workspace avatar is displayed for invoice receiver when it has custom avatar #48358
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
Comments
Triggered auto assignment to @mallenexpensify ( |
We think this issue might be related to the #vip-bills |
ProposalPlease re-state the problem that we are trying to solve in this issue.Default workspace avatar is displayed for invoice receiver when it has custom avatar What is the root cause of that problem?Here we get the avatar from
and in here the avatar URL will be empty and it will fallback to workspace default avatar Line 1856 in 04ffa6c
What changes do you think we should make in order to solve the problem?We need to change this line Line 1856 in 04ffa6c
We have avatar stored in report?.policyAvatar we can do something like this. This is the same way we are getting avatar here. This is why we don't see this problem in header.
What alternative solutions did you explore? (Optional)We can use this function to get workspace icons in |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
@mallenexpensify Hey, it's reproducible on the latest main branch. |
I tested on v9.0.26-6 and this issue was reported with Version Number: v9.0.26-5 |
@mallenexpensify Here are the steps I followed (v9.0.27-0)
Screen.Recording.2024-08-31.at.5.25.52.AM.1.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Default WS avatar is displayed in invoice room if the user isn't part of the workspace. What is the root cause of that problem?When user A sends an invoice to user B from a workspace that user B is not a member of, the policy data will be undefined. When we are trying to get the workspace icon, Lines 2246 to 2250 in 117b961
we already prioritize the avatar from Lines 1937 to 1948 in 117b961
The caching somehow saves the default avatar for the workspace. Here is the logic to decide whether we can get the avatar from the cache or need to save it to the cache or not. Lines 1925 to 1934 in 117b961
The first condition is of course to make sure the cache exists. Second, it checks whether the cached image source and the policy avatar source are the same or not. We will focus on the second condition. As mentioned above, if the user isn't part of the WS, then the policy data will be undefined, so, the It still works fine until the If the Line 1939 in 117b961
And because it's a default avatar, we will return it from the cache. Lines 1930 to 1934 in 117b961
What changes do you think we should make in order to solve the problem?First, we need to solve the issue where we never use the cache if the policy is undefined by using Lines 1927 to 1937 in 117b961
Next, to avoid saving default avatar when
Next, we need to replace
App/src/pages/ReportAvatar.tsx Line 27 in 117b961
Last, I notice that the avatar doesn't update immediately, so we need to update report action item memo to compare for App/src/pages/home/report/ReportActionItem.tsx Lines 1010 to 1014 in 117b961
|
@mallenexpensify I can reproduce it by sending an invoice from user A to B using a workspace that user B is not a member of. |
Job added to Upwork: https://www.upwork.com/jobs/~014c6b9826c08600f4 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Pujan92 ( |
@Pujan92 plz attempt reproduction, if you're able to, plz review the proposals above. thx |
@Pujan92, @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Just sent one in a collect policy using Would you mind trying that? |
Nevermind, it works now after I Clear cache and restart |
It's very late here, I'll continue tomorrow! |
PR is ready cc: @Pujan92 |
Automation didn't work, this is in prod as of 3 days ago #49145 (comment) |
@rlinoz, @Pujan92, @mallenexpensify, @bernhardoj Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Contributor: @bernhardoj due $250 via NewDot @Pujan92 plz complete the BZ checklist. 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:
|
Requested in ND. |
$250 approved for @bernhardoj |
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:
Regression Test Steps
|
I agree we should add the step to check the workspace avatar, that can be added to the testrail that caught this bug: https://expensify.testrail.io/index.php?/tests/view/4864174 |
Thanks @PauloGasparSv and @rlinoz |
$250 approved for @Pujan92 |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.26-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4864174
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Precondition:
Expected Result:
Invoice receiver should be able to see the custom workspace avatar.
Actual Result:
Invoice receiver is unable to see the custom workspace avatar. It shows the default avatar instead.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6573880_1723822556534.20240816_233027.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: