-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] Workspace - Member role is not highlighted for newly-invited member #37940
Comments
Triggered auto assignment to @jliexpensify ( |
👋 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:
|
Triggered auto assignment to @robertjchen ( |
@robertjchen FYI 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. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - Member role is not highlighted for newly-invited member What is the root cause of that problem?When inviting a member, the App/src/libs/actions/Policy.ts Lines 980 to 981 in f550e84
Therefore, just like the WorkspaceMemberDetailsPage , If the role of the member, member?.role , is not present or equal not to CONST.POLICY.ROLE.ADMIN then the role is CONST.POLICY.ROLE.USER .
However, the
What changes do you think we should make in order to solve the problem?Add a default role,
Then handle the Optional: We should probably set What alternative solutions did you explore? (Optional)
Change the above condition to something a condition like the one below.
|
@robertjchen should this be |
Job added to Upwork: https://www.upwork.com/jobs/~01dbe90339ab40577e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Yep, let's field some proposals. I was curious if it was related to backend policy-related Onyx updates. |
PROPOSAL:The issue actually seems to be with policy related Onyx updates. Namely, Policy method App/src/libs/actions/Policy.ts Line 892 in f550e84
role on policy member data (it does not do it on any kind of data -> optimistic or successful) therefore policyMembers Onyx data does not have any role value when reading it in UI component:
Also, there is one more issue -> Policy method App/src/libs/actions/Policy.ts Line 1859 in f550e84
WorkspaceMembersPage (page where all members are listed) is mounted ONLY, and that method actually updates policyMembers in Onyx DB with default role value. That is actually the reason for having roles displayed for any other member which is not newly created. Having this method called when policyMembers change, will fix the issue.
So fixing any of these two issues will do the job, I would personally suggest fixing |
📣 @jeremic-dev! 📣
|
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - Member role is not highlighted for newly-invited member(s). What is the root cause of that problem?A user is given the 'Member' role by default when added to a workspace if they're not an admin.
However, when we add a new member to a workspace, the Since the member's role isn't specified i.e. is
What changes do you think we should make in order to solve the problem?I propose giving new member(s) added to the workspace a default role of 'user' inside - optimisticMembersState[accountID] = {pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD};
+ optimisticMembersState[accountID] = {pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, role: CONST.POLICY.ROLE.USER}; Short demo after changesexpensify-newly-added-member-not-highlighted-solution-demo.movexpensify-newly-added-member-not-highlighted-multiple-people-solution-demo.movWhat alternative solutions did you explore? (Optional)None so far. |
cc @burczu this came from this PR. We have a followup issue and draft PR to fix a few of these issues, let's add this one to it |
Got it, in that case we should close this out and consolidate to the fixes that are ongoing there 👍 |
Added to the tracking issue |
Upworks job removed |
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.49-0
Reproducible in staging?: y
Reproducible in production?: no, new feature
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:
Precondition:
Expected Result:
Member role should be highlighted.
Actual Result:
Member role is not highlighted.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6406295_1709857118224.bandicam_2024-03-08_08-14-42-914.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: