Skip to content

Commit 5997357

Browse files
authored
Merge pull request #21659 from namhihi237/fix-21361-error-when-create-task
2 parents 309279f + 8effa16 commit 5997357

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/libs/actions/Task.js

+5
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,11 @@ function getTaskAssigneeAccountID(taskReport) {
648648

649649
const reportAction = ReportActionsUtils.getParentReportAction(taskReport);
650650
const childManagerEmail = lodashGet(reportAction, 'childManagerEmail', '');
651+
652+
if (!childManagerEmail) {
653+
return null;
654+
}
655+
651656
return PersonalDetailsUtils.getAccountIDsByLogins([childManagerEmail])[0];
652657
}
653658

src/pages/tasks/NewTaskPage.js

-6
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ function NewTaskPage(props) {
8686
setAssignee(displayDetails);
8787
}
8888

89-
// If we don't have an assignee and we are creating a task from a report
90-
// this allows us to auto assign a participant of the report.
91-
if (!props.task.assignee && props.task.parentReportID) {
92-
TaskUtils.setAssigneeValueWithParentReportID(props.task.parentReportID);
93-
}
94-
9589
// We only set the parentReportID if we are creating a task from a report
9690
// this allows us to go ahead and set that report as the share destination
9791
// and disable the share destination selector

0 commit comments

Comments
 (0)