Closed IuliiaHerets closed 16 hours ago
Triggered auto assignment to @CortneyOfstad (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.
@CortneyOfstad 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
Task - Unassigned user can mark a task as incomplete
In ReportDetails page, we are not checking if the current user is assignee or task owner before we are adding mark as incomplete action to menuItems https://github.com/Expensify/App/blob/6eb93964edb5e0013a4ee26331a0f619aba59f3f/src/pages/ReportDetailsPage.tsx#L369-L374
We should check if the user is task assignee or task owner using Task.canActionTask
https://github.com/Expensify/App/blob/6eb93964edb5e0013a4ee26331a0f619aba59f3f/src/libs/actions/Task.ts#L1154-L1158
const canActionTask = Task.canActionTask(report, session?.accountID ?? -1);
if (ReportUtils.isCompletedTaskReport(report) && canModifyTask && canActionTask)
canActionTask
check when adding markAsIncomplete
https://github.com/Expensify/App/blob/6eb93964edb5e0013a4ee26331a0f619aba59f3f/src/pages/ReportDetailsPage.tsx#L367-L381We need to have a fall back in case a task is marked as complete by accident, giving someone the ability undo that (i.e. mark as incomplete).
The second person should have this option (especially if they are an admin on the default workspace), which these instructions are missing as a pre-requisite or not.
Closing!
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: v9.0.36-0 Reproducible in staging?: Y Reproducible in production?: Y Issue was found when executing this PR: https://github.com/Expensify/App/pull/47519 Email or phone of affected tester (no customers): natnael.expensify+3@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
There shouldn't be 'Mark as complete button'
Actual Result:
Task is marked as uncompleted
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/0b35dd29-e6c3-41d3-bf51-115f0be170ee
View all open jobs on GitHub