Problem
On the Members > Invite member > confirmation page, admins can set the new member's approver. That row doesn't always appear for workspaces using a Dynamic External Workflow (DEW), so admins on those workspaces can't set a manager/approver at invite time — a capability they have in Classic.
Root cause
WorkspaceInviteMessageComponent.tsx#L120 gates the row on advanced only:
const shouldShowApproverRow = isControl && policy?.approvalMode === CONST.POLICY.APPROVAL_MODE.ADVANCED && policy?.areWorkflowsEnabled;
CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL is a separate mode, so DEW workspaces fall through and the row is skipped. validatedApprover is also only passed to addMembersToWorkspace when shouldShowApproverRow is true, so even a drafted approver would be dropped.
Proposed fix
Include DYNAMICEXTERNAL in the check (hasDynamicExternalWorkflow() already exists in PolicyUtils):
const isSupportedApprovalMode =
policy?.approvalMode === CONST.POLICY.APPROVAL_MODE.ADVANCED || policy?.approvalMode === CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL;
const shouldShowApproverRow = isControl && isSupportedApprovalMode && policy?.areWorkflowsEnabled;
Keep the row hidden when shouldHideDynamicExternalWorkflowPeople(policy) is true, matching #98491.
Steps to reproduce
- Use a Control workspace with
approvalMode: dynamic_external and Workflows enabled.
- Go to Members > Invite member, select a member, and continue to the confirmation page.
- Expected: an Approver row appears and the chosen approver is applied on invite. Actual: no Approver row.
Related
Reported in Slack.
Issue Owner
Current Issue Owner: @thesahindia
Problem
On the Members > Invite member > confirmation page, admins can set the new member's approver. That row doesn't always appear for workspaces using a Dynamic External Workflow (DEW), so admins on those workspaces can't set a manager/approver at invite time — a capability they have in Classic.
Root cause
WorkspaceInviteMessageComponent.tsx#L120gates the row onadvancedonly:CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNALis a separate mode, so DEW workspaces fall through and the row is skipped.validatedApproveris also only passed toaddMembersToWorkspacewhenshouldShowApproverRowis true, so even a drafted approver would be dropped.Proposed fix
Include
DYNAMICEXTERNALin the check (hasDynamicExternalWorkflow()already exists inPolicyUtils):Keep the row hidden when
shouldHideDynamicExternalWorkflowPeople(policy)is true, matching #98491.Steps to reproduce
approvalMode: dynamic_externaland Workflows enabled.Related
advancedpolicies).dynamicExternalWorkflowHidePeopleis set.Reported in Slack.
Issue Owner
Current Issue Owner: @thesahindia