Skip to content

Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies #100728

Description

@melvin-bot

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

  1. Use a Control workspace with approvalMode: dynamic_external and Workflows enabled.
  2. Go to Members > Invite member, select a member, and continue to the confirmation page.
  3. Expected: an Approver row appears and the chosen approver is applied on invite. Actual: no Approver row.

Related

Reported in Slack.

Issue OwnerCurrent Issue Owner: @thesahindia

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions