App
App copied to clipboard
[HOLD for payment 2024-02-07] [$500] Policy member can't rename the room
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: 1.4.30-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: @jasperhuangg Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1705942899968899
Action Performed:
- Create room as account A and user B is member of the workspace of the room created
- login as user B and open the room created in step1
Expected Result:
User B is able to edit the room name
Actual Result:
Unable to edit
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~016496a22ef9dd8599
- Upwork Job ID: 1749697772594622464
- Last Price Increase: 2024-01-23
- Automatic offers:
- bernhardoj | Contributor | 28122724
Job added to Upwork: https://www.upwork.com/jobs/~016496a22ef9dd8599
Triggered auto assignment to @Christinadobrzyn (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External
)
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace member can't rename the room name.
What is the root cause of that problem?
We currently disallow member to edit the name. https://github.com/Expensify/App/blob/c0608977d90835b34382325732e755733c034240/src/libs/ReportUtils.ts#L4186-L4193
and only allow for workspace owner and admin.
What changes do you think we should make in order to solve the problem?
If the user is a member of the workspace, then returns false (instead of the long condition)
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to edit
What is the root cause of that problem?
We only allow admin to edit the room name
https://github.com/Expensify/App/blob/c0608977d90835b34382325732e755733c034240/src/libs/ReportUtils.ts#L4190-L4192
What changes do you think we should make in order to solve the problem?
We can change this condition to
return !Object.keys(loginList ?? {}).includes(policy.owner) && policy.role === CONST.POLICY.ROLE.AUDITOR;
so admin and user can edit the room name
What alternative solutions did you explore? (Optional)
NA
I agree that we should allow anyone in the room to rename the room - I think this can be external and we have some proposals to review when you have a moment @Santhosh-Sellavel
@bernhardoj
If the user is a member of the workspace, then returns false (instead of the long condition)
How you would check that? Can you share the changes you propose in a new comment? thanks!
@Christinadobrzyn
Can a user with a role auditor edit roomname?
if (!policy) {
return true
}
return false
We will just do it like this. If the policy onyx data exists, then the user is a member of the policy.
https://github.com/Expensify/App/blob/c0608977d90835b34382325732e755733c034240/src/libs/ReportUtils.ts#L4190-L4191 https://github.com/Expensify/App/blob/c0608977d90835b34382325732e755733c034240/src/libs/ReportUtils.ts#L4184-L4188
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @bernhardoj π 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 π
PR is ready
cc: @Santhosh-Sellavel
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.34-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/35223
If no regressions arise, payment will be issued on 2024-02-07. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @bernhardoj requires payment automatic offer (Contributor)
- @Santhosh-Sellavel requires payment through NewDot Manual Requests
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:
- [ ] [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR:
- [ ] [@Santhosh-Sellavel] 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:
- [ ] [@Santhosh-Sellavel] 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:
- [ ] [@Santhosh-Sellavel] Determine if we should create a regression test for this bug.
- [ ] [@Santhosh-Sellavel] 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.
- [ ] [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
We can skip the checklist here, it was intentional earlier & we are allowing members to update now.
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:
- [x] [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR: N/A
- [x] [@Santhosh-Sellavel] 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: N/A
- [x] [@Santhosh-Sellavel] 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
- [x] [@Santhosh-Sellavel] Determine if we should create a regression test for this bug. N/A
- [x] [@Santhosh-Sellavel] 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. N/A
- [x] [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
payment tomorrow
Payouts due:
Contributor: $500 @bernhardoj (In Upwork - https://www.upwork.com/nx/wm/offer/28122724) Contributor+: $500 @Santhosh-Sellavel (in NewExpensify)
Payment day!
paid out based on this payment summary - https://github.com/Expensify/App/issues/34950#issuecomment-1931014376
No regression test so I think this can be closed as complete! Thanks every one!
Requested on ND
$500 approved for @Santhosh-Sellavel based on summary above.