Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,7 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
addWorkspaceRoom: null,
},
pendingAction: null,
isOptimisticReport: false,
},
},
{
Expand All @@ -1705,6 +1706,7 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
},
pendingAction: null,
pendingChatMembers: [],
isOptimisticReport: false,
},
},
{
Expand All @@ -1724,6 +1726,7 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
addWorkspaceRoom: null,
},
pendingAction: null,
isOptimisticReport: false,
},
},
{
Expand Down
12 changes: 12 additions & 0 deletions src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,17 @@ function clearOutTaskInfoAndNavigate(reportID?: string, chatReport?: OnyxEntry<O
Navigation.navigate(ROUTES.NEW_TASK_DETAILS);
}

/**
* Start out create task action quick action step
*/
function startOutCreateTaskQuickAction(reportID: string, targetAccountID: number) {
// The second parameter of clearOutTaskInfoAndNavigate is the chat report or DM report
// between the user and the person to whom the task is assigned.
// Since chatReportID isn't stored in NVP_QUICK_ACTION_GLOBAL_CREATE, we set
// it to undefined. This will make setAssigneeValue to search for the correct report.
clearOutTaskInfoAndNavigate(reportID, undefined, targetAccountID, true);
}

/**
* Get the assignee data
*/
Expand Down Expand Up @@ -1149,6 +1160,7 @@ export {
reopenTask,
completeTask,
clearOutTaskInfoAndNavigate,
startOutCreateTaskQuickAction,
getAssignee,
getShareDestination,
deleteTask,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ function FloatingActionButtonAndPopover(
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.PAY, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), false);
return;
case CONST.QUICK_ACTIONS.ASSIGN_TASK:
selectOption(
() => Task.clearOutTaskInfoAndNavigate(isValidReport ? quickActionReportID : '', isValidReport ? quickActionReport : undefined, quickAction.targetAccountID ?? -1, true),
false,
);
selectOption(() => Task.startOutCreateTaskQuickAction(isValidReport ? quickActionReportID : '', quickAction.targetAccountID ?? -1), false);
break;
case CONST.QUICK_ACTIONS.TRACK_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), false);
Expand Down