Skip to content

Commit

Permalink
Merge pull request #30816 from bernhardoj/fix/30804-can't-create-sub-…
Browse files Browse the repository at this point in the history
…task

[CP Staging] Fix there is no assign task option on a task report

(cherry picked from commit 4322ad9)
  • Loading branch information
Beamanator authored and OSBotify committed Nov 3, 2023
1 parent e1d6cc5 commit b3cc994
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ function isExpensifyOnlyParticipantInReport(report) {
*/
function canCreateTaskInReport(report) {
const otherReportParticipants = _.without(lodashGet(report, 'participantAccountIDs', []), currentUserAccountID);
const areExpensifyAccountsOnlyOtherParticipants = _.every(otherReportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID));
const areExpensifyAccountsOnlyOtherParticipants =
otherReportParticipants.length >= 1 && _.every(otherReportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID));
if (areExpensifyAccountsOnlyOtherParticipants && isDM(report)) {
return false;
}
Expand Down

0 comments on commit b3cc994

Please sign in to comment.