From cc1153ad0091a91f83f72a85db749dadd87ad32c Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 27 Jun 2023 09:11:50 +0700 Subject: [PATCH 1/2] fix: remove assign and make empty avatar header --- src/libs/actions/Task.js | 5 +++++ src/pages/tasks/NewTaskPage.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 5e27d7db764d..59a84182b803 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -648,6 +648,11 @@ function getTaskAssigneeAccountID(taskReport) { const reportAction = ReportActionsUtils.getParentReportAction(taskReport); const childManagerEmail = lodashGet(reportAction, 'childManagerEmail', ''); + + if (!childManagerEmail) { + return null; + } + return PersonalDetailsUtils.getAccountIDsByLogins([childManagerEmail])[0]; } diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index 90d635e43ae9..cd7632576024 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -86,11 +86,6 @@ function NewTaskPage(props) { setAssignee(displayDetails); } - // If we don't have an assignee and we are creating a task from a report - // this allows us to auto assign a participant of the report. - if (!props.task.assignee && props.task.parentReportID) { - TaskUtils.setAssigneeValueWithParentReportID(props.task.parentReportID); - } // We only set the parentReportID if we are creating a task from a report // this allows us to go ahead and set that report as the share destination From 8effa16d3658104c6e19786c7112cc8f8784c0ec Mon Sep 17 00:00:00 2001 From: Nam Le Date: Thu, 29 Jun 2023 06:05:14 +0700 Subject: [PATCH 2/2] fix lint --- src/pages/tasks/NewTaskPage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index cd7632576024..127592601aec 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -86,7 +86,6 @@ function NewTaskPage(props) { setAssignee(displayDetails); } - // We only set the parentReportID if we are creating a task from a report // this allows us to go ahead and set that report as the share destination // and disable the share destination selector