Skip to content

Commit

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

[CP Staging] Fix there is no assign task option on a task report
  • Loading branch information
Beamanator authored Nov 3, 2023
2 parents 18c219f + 3e9b11c commit 4322ad9
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 4322ad9

Please sign in to comment.