-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[REPRODUCTION NEEDED] [HOLD for task cleanup] [LOW] [$500] Task - Closed account shows "undefined" and task created by closed account is not accessible #33701
Comments
Job added to Upwork: https://www.upwork.com/jobs/~013e5627e7dbd851e2 |
Triggered auto assignment to @strepanier03 ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
@s77rt Currently, we get task title based on the task report. But when the task creator account is closed, the BE will not return this task report to everyone in the group, the task title in the parent report is empty and we also can't access to the task report |
@s77rt While investigating this issue, I believe this problem has already been addressed by another pull request but has not been released yet. However, I have identified another issue where the task title is not displayed anywhere, as shown in the picture below. |
[Updated] ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?We obtain the task title from the BE , and when the user who created the task is deleted, the BE is not sending the What changes do you think we should make in order to solve the problem?The BE should also send the deleted user task report. What alternative solutions did you explore? (Optional)As @s77rt 's suggestion here, we will display deleted task if the task creator account is close return taskTitle ? Localize.translateLocal('task.messages.created', {title: taskTitle}) : Localize.translateLocal('parentReportAction.deletedTask'); And in const taskOwnerAccountID = Task.getTaskOwnerAccountID(props.taskReport);
if (isDeletedParentAction || !taskOwnerAccountID) {
return <RenderHTML html={`<comment>${props.translate('parentReportAction.deletedTask')}</comment>`} />;
}
|
@ankit-ashutec Thanks for the proposal. Your RCA is correct. I think we should go with the alternative solution as the BE cannot send deleted data. But instead of changing every instance where fallbackTitle || Localize.translateLocal('parentReportAction.deletedTask'); Also we'd need to prevent clicking on that deleted task. Can you please update your proposal to cover that as well? |
ProposalPlease re-state the problem that we are trying to solve in this issue.Task - Closed account shows "undefined" and task created by closed account is not accessible What is the root cause of that problem?Currently, we get task title based on the task report. But when the task creator account is closed, the BE will not return this task report to everyone in the group, the task title in the parent report is empty and we also can't access to the task report What changes do you think we should make in order to solve the problem?As @s77rt's suggestion here, we will display deleted task if the task creator account is close App/src/components/ReportActionItem/TaskPreview.js Lines 106 to 108 in 939632e
So that we need to update like that
With this approach, we also prevent users from clicking on the task report We also update the same thing in the LHN Line 48 in 8cb48e4
we should update like that
Result![]() What alternative solutions did you explore? (Optional)We also consider displaying another message like "Task is deleted because the creator account is closed" to avoid confusion |
@DylanDylann Thanks for the proposal. Your RCA is correct. However the solution won't work as expected as an empty report object does not necessary mean that the task is deleted. This caused many existing tasks showing up as deleted. |
Because we want to display [Deleted task] in this case we need to update the condition here App/src/components/ReportActionItem/TaskPreview.js Lines 106 to 108 in 939632e
So that we also hide the checkbox before task title If we change getTaskTitle directly:
[Deleted task] will display with the checkbox and the user still can access to task report by clicking on it |
@DylanDylann Thanks for the update. That would work but I think I overlooked the |
@s77rt This is task report action in this case There are no signs to recognize that the task creation account is now closed. So that isDeletedParentAction still be false |
This should be internal. When a user closes his account we are deleting the linked tasks. Each task has a parent report action (or more - if share destination and assignee are different). We should update those report actions as follow: previousMessage: reportAction.message
message: [
type: 'COMMENT',
html: '',
text: '',
isEdited: true,
isDeletedParentAction: true,
] 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@DylanDylann That's the task parent report action. It's up to the BE to update it correctly when the task (child) is deleted. |
@ankit-ashutec Thanks for the update. I think this should be fixed internally as the parent report action is outdated. It can only be fixed in the BE. |
I tagged this for testing and if it can't be repro'd I'm going to close it. |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
Still waiting for repro ^ |
Same ^ |
Currently, after we close an account that creates the task, the task preview display is empty and when clicking the task, Not Found Page appears. Because we still save taskReportID in the action but the task report is deleted Screen.Recording.2024-10-01.at.14.40.12.mov@s77rt I think we need to confirm the expectation again cc @srikarparsi |
@DylanDylann Is the task preview text coming from the report action or the report? Regarding task accessibility after account deletion, I have asked in Slack |
Let's see the logic to return Line 45 in 7dde09e
In this case, ![]() So this function will return ![]() |
@DylanDylann Ah okay got it! Thanks. Given the info we have the FE can we determine if a task is deleted? |
@s77rt Yes, To determine if a task is deleted, we need two checks:
|
Anyways, we should confirm the expected first 😄 |
Just bumped the slack thread. |
I'm not sure if that would work. What if the task exists but we just don't have it in Onyx? I think we may need a BE change in the report action e.g. check against |
Discussing here. |
Due to changing the prioritization and utilization of Tasks, we are going to close this and most if not all other bugs dealing with tasks. Thank you all, closing this now. |
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: v1.4.18-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
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
Action Performed:
Precondition: applause.expensifail.com accounts are used.
Expected Result:
In Step 6, the preview for the group chat will display the email of the closed account.
In Step 7, the task should be still accessible.
Actual Result:
In Step 6, the preview for the group chat displays "undefined".
In Step 7, the task is not accessible. Error page shows up.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6327255_1703734595277.20231227_223604__1___1_.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: