Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
- Launch app
- Tap announce room
- Tap plus icon
- Select assign task
- Enter title "Ree task" and tap next
- Tap confirm task
- Navigate back to LHN
- Tap profile
- Tap Workspaces
- Select the Workspace(in whose announce room task is created)
- Tap on 3dots on top and delete the workspace
- Navigate to LHN and note the created task( " Ree Task") is archived
- Tap on archived Workspace and confirm Workspace is archived
- Open the archived announce room
- Tap on the task and note the task report header
- Tap back and tick the task
- Tap on the task again and note the task report header
Expected Result:
In archived WS-announce room, user must not be able to tick the task and interact.
The archived task report must remain archived after reopening the report also.
Actual Result:
In archived WS-announce room, user able to tick the task and interact.
The archived task report is no longer archived after reopening the report.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android / native
- Android / Chrome
- iOS / native
- iOS / Safari
- MacOS / Chrome / Safari
- MacOS / Desktop
Version Number: 1.3.79-3
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6228480_1696662427683.ree.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~019a5d1f4f0cd37991
- Upwork Job ID: 1710593181054087168
- Last Price Increase: 2023-11-20
- Automatic offers:
- mollfpr | Reviewer | 27773918
- s-alves10 | Contributor | 27773920
Activity
[-]Android-Workspace-The archived task report is no longer archived after reopening the report.[/-][+][$500] Android-Workspace-The archived task report is no longer archived after reopening the report.[/+]melvin-bot commentedon Oct 7, 2023
Job added to Upwork: https://www.upwork.com/jobs/~019a5d1f4f0cd37991
melvin-bot commentedon Oct 7, 2023
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 7, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 7, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)graylewis commentedon Oct 7, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tasks that belong to an archived task report are still able to be completed/reopened
What is the root cause of that problem?
This actually seems to be a backend issue. This is evident due to the data coming from the API from the openReport call containing the property:
"isDeletedParentAction": false. The reason the title on the task is briefly correct [shows {TaskName} (Archived)] is due to optimistic updates. The task report is never actually archived.What changes do you think we should make in order to solve the problem?
Backend code needs to be checked for bugs regarding the calculation of the isDeletedParentAction prop in the context of an archived workspace.
If a patch for the frontend is needed in the meantime, a line could be added to
isDeletedParentActionwhich utilizes the persisted onyx store to look for the actionType "CLOSED" at the key for the report being opened.dummy-1111 commentedon Oct 7, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The task report action in archived announce room is interactable and the task report is no longer archived after reopen the report
What is the root cause of that problem?
When we delete a workspace, we set the archived state of related reports here
App/src/libs/actions/Policy.js
Lines 93 to 102 in 389d7b0
Task report is marked as archived as well. But when we reopen the task report, the backend returns
state: 0, status: 0again and so the task report returns to the normal state. This is one reasonAfter the workspace is deleted, we should disable the interaction of tasks. We disable the task using the below function
App/src/libs/actions/Task.js
Lines 889 to 903 in 389d7b0
As you can see, we don't check if the parent report is an archived room. This is another reason
What changes do you think we should make in order to solve the problem?
This issue requires both the backend and frontend fixes
Backend
When a workspace is deleted, the backend should mark all the reports related to the workspace
archivedFrontend
We need to update the
canModifyTaskfunction above to check the parent reportUpdate the above function as follows
This works as expected
What alternative solutions did you explore? (Optional)
mollfpr commentedon Oct 9, 2023
Asking the internal team for the expected behavior of the task report when the parent report is archived.
93 remaining items
dummy-1111 commentedon Feb 15, 2024
@mollfpr @muttmuure
PR is ready for review: #31674
dummy-1111 commentedon Feb 29, 2024
@pecanoro
Automation looks not working. Pay day would be 6th, Mar here
[-][$500] Workspace-The archived task report is no longer archived after reopening the report.[/-][+][Hold for payment 2024-03-06] [$500] Workspace-The archived task report is no longer archived after reopening the report.[/+]muttmuure commentedon Mar 7, 2024
Seems like this is fixed, issuing payment now
muttmuure commentedon Mar 7, 2024
Sent new offer to @mollfpr since the original offer expired
muttmuure commentedon Mar 7, 2024
@s-alves10 has been paid
mollfpr commentedon Mar 9, 2024
No offending PR was found. This is an improvement and need a backend change to fix the issue both ways.
The regression step should be good.
@muttmuure I'll request in NewDot. Could you create the payment summary? Thank you!
muttmuure commentedon Mar 12, 2024
$500 - @mollfpr C+
JmillsExpensify commentedon Mar 13, 2024
$500 approved for @mollfpr based on summary.