Skip to content

Commit

Permalink
Merge pull request #21659 from namhihi237/fix-21361-error-when-create…
Browse files Browse the repository at this point in the history
…-task
  • Loading branch information
thienlnam authored Jun 28, 2023
2 parents 309279f + 8effa16 commit 5997357
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/libs/actions/Task.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
6 changes: 0 additions & 6 deletions src/pages/tasks/NewTaskPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +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
// and disable the share destination selector
Expand Down

0 comments on commit 5997357

Please sign in to comment.