-
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 296932][$1000] Task - Mark as Done button is unavailable for the Policy admin user #23407
Comments
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The mark as done button is unavailable for the policy admin. What is the root cause of that problem?In the
This problem extends to usages elsewhere of
What changes do you think we should make in order to solve the problem?Add a condition to the For convenience, we could define a new util function that encompasses both checks, which we can apply here and elsewhere. What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Mark as Done button is unavailable for the Policy admin user What is the root cause of that problem?In App/src/components/TaskHeaderActionButton.js Lines 47 to 50 in b7d17e0
What changes do you think we should make in order to solve the problem?We should add a check for Line 119 in cd851d0
Finally
admin_mark_as_done_enable.movWhat alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Task - Mark as Done button is unavailable for the Policy admin user What is the root cause of that problem?We have added the check for disabling the
It restricts the button only enabled to task assignee and task creator, that's why What changes do you think we should make in order to solve the problem?We shall modify the check to disable button, we shall add another condition - enable if current user is policy admin or not.
the final condition here is -
While the above two proposals mention the same root cause, and solution partially. Because there is no method What alternative solutions did you explore? (Optional)This bug involves solving for
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Task - Mark as Done button is unavailable for the Policy admin user What is the root cause of that problem?This is the current condition to disable the Mark as done Button
See that we don't have logic to check if the current user is the policy admin Similar bug with same Root causeBefore coming to my solution, I see that we have some similar bugs with the same RCA that we don't check if the current user is policy admin or not In the above image, the three-dot in the header doesn't appear like this The root cause is we don't check if the current user is admin or not in here App/src/pages/home/HeaderView.js Line 104 in cd851d0
App/src/pages/home/HeaderView.js Line 113 in cd851d0
App/src/pages/home/HeaderView.js Line 122 in cd851d0
What changes do you think we should make in order to solve the problem?To fix all cases, we should update the name of isTaskAssigneeOrTaskOwner function to isTaskAssigneeOrTaskOwnerOrPolicyAdmin, and add logic to check if the current user is policy admin
Note that: In all places we use isTaskAssigneeOrTaskOwner we also need to check if the current user is policy admin What alternative solutions did you explore? (Optional)We add the condition to check if the current user is policy admin to following places: App/src/pages/home/HeaderView.js Line 104 in cd851d0
App/src/pages/home/HeaderView.js Line 113 in cd851d0
App/src/pages/home/HeaderView.js Line 122 in cd851d0
ResultScreen.Recording.2023-07-23.at.13.59.17.mov |
Job added to Upwork: https://www.upwork.com/jobs/~01efe1be768b7b85bc |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
@lanitochka17 Is this is a regression or new request? Is it expected in the App that Admin can change tasks created by others? Also, was this happening previously before #22851? |
@parasharrajat please have a look at this comment. I have raised a similar issue before. And this seems like a bug because policy admin should be able to edit the task. |
@kevinksullivan, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Tracking the issue above #23407 (comment). |
@parasharrajat meaning we should put this on hold for now? |
We don't need to put this on hold. This is a bug as mentioned here: #21579 (comment) and we need to fix it |
Looks like we are making some changes on the backend to change task permissions Expensify/expensify/issues/296932. I don't have access to it so can't tell for sure. IMO, we should be holding this issue on the internal one. |
@thienlnam Ping you here because this comment. Could you help to make a decision about what we should do about this issue? |
Sure. |
@thienlnam You mentioned solving task permission on the backend #21579 (comment). Can you help us determine if we should be holding this issue or not? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Yes let's please hold this issue - I have yet to make the corresponding App changes once I'm done with the back-end changes |
Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new. |
Will be taken care of internally in -> https://github.com/Expensify/Expensify/issues/296932 |
In other words we should close @thienlnam ? |
Yeah we can close this, basically a dupe |
sounds good |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #22851
Action Performed:
Expected Result:
Policy admin user should be able to change Task's title, description and mark as done
Actual Result:
The Policy admin user can' use Mark as done button (the button is greyed out) while it's possible to change Task's fields and set Checkbox
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.44.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6137801_Screen_Recording_2023-07-22_at_18.33.40.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: