Skip to content

Commit

Permalink
fix: uncovered case for report with task owner when log in with assignee
Browse files Browse the repository at this point in the history
  • Loading branch information
sangar-1028 committed Aug 7, 2023
1 parent 2e3f28e commit 5152ef3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,6 @@ function buildOptimisticTaskReport(ownerAccountID, assigneeAccountID = 0, parent
description,
ownerAccountID,
managerID: assigneeAccountID,
participantAccountIDs: [assigneeAccountID],
type: CONST.REPORT.TYPE.TASK,
parentReportID,
stateNum: CONST.REPORT.STATE_NUM.OPEN,
Expand Down Expand Up @@ -2781,7 +2780,7 @@ function getParentReport(report) {
* @returns {Object}
*/
function getTaskParentReportActionIDInAssigneeReport(taskReport) {
const assigneeChatReportID = lodashGet(getChatByParticipants(taskReport.participantAccountIDs), 'reportID');
const assigneeChatReportID = lodashGet(getChatByParticipants(isTaskAssignee(taskReport) ? [taskReport.ownerAccountID] : [taskReport.managerID]), 'reportID');
if (!assigneeChatReportID || assigneeChatReportID === taskReport.parentReportID) {
return {};
}
Expand Down

0 comments on commit 5152ef3

Please sign in to comment.