Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tasks assigned disappears from LHN when leaving the chat in focus mode #23938

Merged
merged 4 commits into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,10 @@ function isWaitingForIOUActionFromCurrentUser(report, allReportsDict = null) {
return false;
}

function isWaitingForTaskCompleteFromAssignee(report) {
return isTaskReport(report) && isTaskAssignee(report) && isOpenTaskReport(report);
}

/**
* @param {Object} report
* @param {Object} allReportsDict
Expand Down Expand Up @@ -2277,9 +2281,8 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, iouRep
return true;
}

// Include reports if they have a draft or have an outstanding IOU
// These are always relevant to the user no matter what view mode the user prefers
if (report.hasDraft || isWaitingForIOUActionFromCurrentUser(report, iouReports)) {
// Include reports that are relevant to the user in any view mode. Criteria include having a draft, having an outstanding IOU, or being assigned to an open task.
if (report.hasDraft || isWaitingForIOUActionFromCurrentUser(report, iouReports) || isWaitingForTaskCompleteFromAssignee(report)) {
return true;
}

Expand Down
Loading