Skip to content

Commit

Permalink
Merge pull request #26976 from dukenv0307/fix/26389
Browse files Browse the repository at this point in the history
Remove optimistic parent report action when adding system message
  • Loading branch information
arosiclair authored Sep 11, 2023
2 parents bfc6468 + 797b7d4 commit 00ad8cf
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/libs/actions/Task.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,6 @@ function completeTask(taskReport, taskTitle) {
},
];

// Update optimistic data for parent report action
const optimisticDataForParentReportAction = ReportUtils.getOptimisticDataForParentReportAction(taskReportID, completedTaskReportAction.created, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD);
if (!_.isEmpty(optimisticDataForParentReportAction)) {
optimisticData.push(optimisticDataForParentReportAction);
}

// Multiple report actions can link to the same child. Both share destination (task parent) and assignee report link to the same report action.
// We need to find and update the other parent report action (in assignee report). More info https://github.com/Expensify/App/issues/23920#issuecomment-1663092717
const assigneeReportAction = ReportUtils.getTaskParentReportActionIDInAssigneeReport(taskReport);
Expand Down Expand Up @@ -363,12 +357,6 @@ function reopenTask(taskReport, taskTitle) {
},
];

// Update optimistic data for parent report action
const optimisticDataForParentReportAction = ReportUtils.getOptimisticDataForParentReportAction(taskReportID, reopenedTaskReportAction.created, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD);
if (!_.isEmpty(optimisticDataForParentReportAction)) {
optimisticData.push(optimisticDataForParentReportAction);
}

// Multiple report actions can link to the same child. Both share destination (task parent) and assignee report link to the same report action.
// We need to find and update the other parent report action (in assignee report). More info https://github.com/Expensify/App/issues/23920#issuecomment-1663092717
const assigneeReportAction = ReportUtils.getTaskParentReportActionIDInAssigneeReport(taskReport);
Expand Down

0 comments on commit 00ad8cf

Please sign in to comment.