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
[$500] Chat - WS custom avatar is not updated in chat conversation after request money #32507
Version Number: 1.4.8.0 Reproducible in staging?: Y Reproducible in production?: Y 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:
Action Performed:
Launch the app
Log in with any account
Set your avatar to custom avatar
Set your WS to custom avatar
Go to Expense report
Request Money
Expected Result:
WS custom avatar is updated in chat conversation after request money
Actual Result:
WS custom avatar is not updated in chat conversation after request money
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Chat - WS custom avatar is not updated in chat conversation after request money[/-][+][$500] Chat - WS custom avatar is not updated in chat conversation after request money[/+]on Dec 5, 2023
Please re-state the problem that we are trying to solve in this issue.
The custom avatar of a workspace is not displayed, the default avatar is shown.
What is the root cause of that problem?
There is a broken key, by which we are trying to fetch the avatar of a workspace. The policies collection stores the keys in the format policy_${policyID}, while we try to access it by policy${policyID}. As a result, the avatar is undefined, and the fallback value of getDefaultWorkspaceAvatar(workspaceName) is returned.
Here in this function we get the avatar for the respective policy.
If we carefully observe that we're accessing the policy from allPolicies with key policy${report.policyID} but we save the policies in the following format.
policy_${report.policyID}
What changes do you think we should make in order to solve the problem?
Updating access key with _ should solve the issue.
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
Activity
[-]Chat - WS custom avatar is not updated in chat conversation after request money[/-][+][$500] Chat - WS custom avatar is not updated in chat conversation after request money[/+]melvin-bot commentedon Dec 5, 2023
Triggered auto assignment to @zanyrenney (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 5, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01863c1504c75474be
melvin-bot commentedon Dec 5, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 5, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)paultsimura commentedon Dec 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The custom avatar of a workspace is not displayed, the default avatar is shown.
What is the root cause of that problem?
There is a broken key, by which we are trying to fetch the avatar of a workspace. The policies collection stores the keys in the format
policy_${policyID}, while we try to access it bypolicy${policyID}. As a result, the avatar isundefined, and the fallback value ofgetDefaultWorkspaceAvatar(workspaceName)is returned.App/src/libs/ReportUtils.ts
Lines 1168 to 1171 in 83451a8
What changes do you think we should make in order to solve the problem?
In here, we should change the key
policy${report?.policyID}topolicy_${report?.policyID}App/src/libs/ReportUtils.ts
Lines 1168 to 1171 in 83451a8
Result:
What alternative solutions did you explore? (Optional)
b4s36t4 commentedon Dec 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat - WS custom avatar is not updated in chat conversation after request money
What is the root cause of that problem?
We have all the logic placed with the code, but there is some issue on how we're accessing the policy data and that's causing an issue.
App/src/libs/ReportUtils.ts
Line 1168 in a12d140
If we carefully observe that we're accessing the policy from
allPolicieswith keypolicy${report.policyID}but we save the policies in the following format.What changes do you think we should make in order to solve the problem?
Updating access key with
_should solve the issue.What alternative solutions did you explore? (Optional)
NA
aimane-chnaif commentedon Dec 5, 2023
Asked author of offending PR since it's still within regression period
kubabutkiewicz commentedon Dec 6, 2023
@aimane-chnaif PR is ready
aimane-chnaif commentedon Dec 6, 2023
cc: @shubham1206agra for review
melvin-bot commentedon Dec 12, 2023
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
mountiny commentedon Dec 12, 2023
This was a regression from another PR so I think we can actually close this issue given the PR was merged and its simple enough
melvin-bot commentedon Dec 13, 2023
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
mountiny commentedon Dec 14, 2023
There was a regression from this PR, which was already a fix for a regression so I think we can close without payments here.