-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-07-24] [$250] Categorizing - Workspace member has option to edit categories, which leads to not here page #43623
Comments
Triggered auto assignment to @laurenreidexpensify ( |
@laurenreidexpensify 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. |
We think this bug might be related to #vip-vsb |
Job added to Upwork: https://www.upwork.com/jobs/~01693c1a6724bab4ab |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.What is the root cause of that problem?We always show the edit button here even there are no enabled categories in the WS without checking whether the user is the admin of the WS or not What changes do you think we should make in order to solve the problem?We should only show the edit button here if the user is an admin of the WS.
OPTIONAL: If the user is not the admin of the WS, we also can add another description text for the empty state in What alternative solutions did you explore? (Optional)Or we also can hide the workspace option that has no enabled category if the user cannot edit this WS (is not admin of the WS) |
📣 @daledah! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace member has option to edit categories, even when they are not admin which leads to not here page What is the root cause of that problem?We have condition to show empty categories page which is true if there are no categories in the selected workspace. This will also show the edit categories page without checking if the current user is the admin or not and as the member of the policy won't have access to edit the categories, they will land on not here page What changes do you think we should make in order to solve the problem?We should use the Lines 153 to 155 in 1883f99
Updated code would be: const isPolicyAdmin = useMemo(() => PolicyUtils.isPolicyAdmin(policy), [policy]);
.
.
.
( isPolicyAdmin && <FixedFooter style={[styles.mtAuto, styles.pt5]}>
<Button
large What alternative solutions did you explore? (Optional) |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@allgandalf Other parts of our codebase also use this condition to check
So my solution should be chosen because it is the first proposal with the correct RCA and solution. The use of the isPolicyAdmin function in the places mentioned above can be done in the PR phase. |
@daledah , I suggested the proposal based on current implementation in Workspace pages, I leave the final decision to our internal engineer @neil-marcellini , thanks 🙏 |
I like that proposal too, but I think we should go one step further and edit that empty categories page to have different text when a non-admin is viewing it. They don't have the ability to add categories so instead it should explain that the workspace doesn't have any enabled categories, and they should ask an admin to enable some categories or pick a different workspace. Alternatively we could exclude workspaces without categories from the list, but then users might be confused about why it's missing, so I think it's better to show it. I will start a Slack discussion to make sure we're aligned on the expected behavior. |
@neil-marcellini I also mentioned the idea of different text in the main solution. |
Triggered auto assignment to @dubielzyk-expensify ( |
This comment was marked as resolved.
This comment was marked as resolved.
Note False alarm, no regression, the expected result was mentioned with reference to this issue and hence melvin alerted |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊 For reference, here are some details about the assignees on 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:
|
No offending PR really, the piece of code we updated was last touched 2 years back 🫨 , IMO this is a missed implementation detail for whispers
Regression Test Proposal
Verify that: the workspace without categories isn't an option Do we agree 👍 or 👎 |
Note This is due for payment today, thanks :) |
Payouts due:
|
@daledah will you share your upwork profile with me so I can extend an offer? |
@adelekennedy Sorry I'm having some issue with my Upwork account and is actively resolving it, I'll post an update on it early next week. |
let me know @daledah I'll keep this issue open for now |
@adelekennedy All good now! Please help send an offer to my profile https://www.upwork.com/freelancers/~0138d999529f34d33f |
not overdue melvin :) |
thank you @daledah! Offer sent |
@daledah bump to accept the offer! |
@adelekennedy I did it, thanks for the kind bump |
payment made! Closing this |
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.82-1
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:
Precondition:
Expected Result:
In Step 6, there should be no option for workspace member to "edit categories". Also, because the member is not an admin, the empty categories page should say this for the title "{workspaceName} doesn't have any categories enabled", and this for the subtext "Categorize this expense by choosing a different workspace, or [ask your admin](link to member's policy expense chat) to enabled categories for this workspace". Lets swap out the Categories button with a "Got it" button which navigates back to the workspace selector.
Here is an example mockup, but we can probably use the existing illustration and only update the text on the page when the member is not an admin.
Here is the Slack thread where this was discussed.
Actual Result:
In Step 6, there is an option for workspace member to "edit categories", which leads to not here page.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6511280_1718221633917.20240613_034107.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @adelekennedyThe text was updated successfully, but these errors were encountered: