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-08-02] [$250] Workspace - "Remove member" modal show that the user is an approver when they are not approver #45510
Version Number: 9.0.7-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Create a new workspace
Go to workspace settings > Members
Add some members
Click on any member
Click Remove from workspace
Expected Result:
"Remove member" modal will not show that the user is an approver if they are not an approver
Actual Result:
"Remove member" modal show that the user is an approver when they are not an approver
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@kadiealexander 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
Please re-state the problem that we are trying to solve in this issue.
"Remove member" modal show that the user is an approver when they are not approver
What is the root cause of that problem?
When isApprover is false, we are not returning translate('workspace.people.removeMemberPrompt', {memberName: displayName});. Therefore, code execution continues to the next line of code and return translate('workspace.people.removeMembersWarningPrompt', {memberName: displayName, ownerName: policyOwnerDisplayName});
changed the title [-]Workspace - "Remove member" modal show that the user is an approver when they are not approver[/-][+][$250] Workspace - "Remove member" modal show that the user is an approver when they are not approver[/+]on Jul 17, 2024
Problem Statement
"Remove member" modal should show that the user is an approver when they are not an approver but it is showing user is an approver even if they are not an approver.
Problem
In the confirm modal prompt, we are getting the false value in isApprover but it is not returned
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 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:
[@allgandalf] 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: n/a
[@allgandalf] Determine if we should create a regression test for this bug.
[@allgandalf] 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.
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: N/A
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.
Regression Test Proposal 1
Precondition: Workspace member is an approver of the workspace.
As a admin, Go to workspace settings
Go to members
Click on the profile of a member who is approver and click on remove member
Verify that you see the message : ${memberName} is an approver in this workspace. When you unshare this workspace with them, we’ll replace them in the approval workflow with the workspace owner, ${ownerName}
Regression Test Proposal 2
Precondition: Workspace member is not an approver of the workspace.
As a admin, Go to workspace settings
Go to members
Click on the profile of a member who is approver and click on remove member
Verify that you see the message : Are you sure you want to remove ${memberName}?
Activity
melvin-bot commentedon Jul 16, 2024
Triggered auto assignment to @kadiealexander (
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.lanitochka17 commentedon Jul 16, 2024
@kadiealexander 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
lanitochka17 commentedon Jul 16, 2024
We think that this bug might be related to #wave-collect - Release 1
etCoderDysto commentedon Jul 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Remove member" modal show that the user is an approver when they are not approver
What is the root cause of that problem?
When
isApproveris false, we are not returningtranslate('workspace.people.removeMemberPrompt', {memberName: displayName});. Therefore, code execution continues to the next line of code and returntranslate('workspace.people.removeMembersWarningPrompt', {memberName: displayName, ownerName: policyOwnerDisplayName});App/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx
Lines 73 to 77 in e009c43
What changes do you think we should make in order to solve the problem?
Add
returnstatement beforetranslate('workspace.people.removeMemberPrompt', {memberName: displayName});Note:
isApproverseems to be returning false for approver too. We can fix that too by adding|| employeeLogin === policy?.approverbelow (LN 108)App/src/libs/actions/Policy/Member.ts
Lines 105 to 108 in 307565a
Doing that will fix similar issues on workspace member page too
What alternative solutions did you explore? (Optional)
Result:
Screen.Recording.2024-07-16.at.10.26.11.at.night.mp4
etCoderDysto commentedon Jul 16, 2024
Proposal Updated:
[-]Workspace - "Remove member" modal show that the user is an approver when they are not approver[/-][+][$250] Workspace - "Remove member" modal show that the user is an approver when they are not approver[/+]melvin-bot commentedon Jul 17, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01b2f905d2ab7918d6
melvin-bot commentedon Jul 17, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf (
External)codeapexdev commentedon Jul 17, 2024
Proposal
Problem Statement
"Remove member" modal should show that the user is an approver when they are not an approver but it is showing user is an approver even if they are not an approver.
Problem
In the confirm modal prompt, we are getting the false value in isApprover but it is not returned
Solution
return translate('workspace.people.removeMemberPrompt', {memberName: displayName});
Contributor details
Your Expensify account email: akashftg@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0114eee6cee79fee8e
26 remaining items
melvin-bot commentedon Jul 26, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 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-08-02. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 26, 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:
allgandalf commentedon Jul 29, 2024
The PR that introduced the bug has been identified. Link to the PR: feat: Display warning prompt when removing an approver from a control policy #44008
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: https://github.com/Expensify/App/pull/44008/files#r1694533629
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: N/A
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.
Regression Test Proposal 1
Precondition: Workspace member is an approver of the workspace.
Verify that you see the message :
${memberName} is an approver in this workspace. When you unshare this workspace with them, we’ll replace them in the approval workflow with the workspace owner, ${ownerName}Regression Test Proposal 2
Precondition: Workspace member is not an approver of the workspace.
Verify that you see the message :
Are you sure you want to remove ${memberName}?Do we agree 👍 or 👎
francoisl commentedon Jul 29, 2024
LGTM, opened internal issue to create a regression test.
allgandalf commentedon Aug 4, 2024
Can this be paid out please :)
kadiealexander commentedon Aug 5, 2024
Payouts due:
Upwork job is here.
kadiealexander commentedon Aug 5, 2024
@etCoderDysto I can't find you on Upwork, could you please apply to the Upwork job?
kadiealexander commentedon Aug 7, 2024
@etCoderDysto sent you an offer, thanks!
etCoderDysto commentedon Aug 7, 2024
@kadiealexander I have accepted the offer. Thanks!