You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$175] Workflow-The approver selected while inviting a member not save if default approver not owner #108618
changed the title [-]Workflow-The approver selected while inviting a member not save if default approver not owner[/-][+][$175] Workflow-The approver selected while inviting a member not save if default approver not owner[/+]on Dec 2, 2026
Alternative explanation: Approval-mode filtering can hide a nondefault workflow and display its members under the default approver, even if their stored selection remains correct: WorkflowUtils.ts:809–829. This could explain both symptoms, but the affected workspace’s approval mode is unknown.
Evidence needed before recommending a fix
Capture the failing invitation’s request, response, and resulting workspace state:
Does employees[].submitsTo contain the selected approver?
Does the invited member retain that value after the response?
What are the workspace’s approvalMode and applicable approval rules?
These distinguish selection loss, server-side replacement, and display filtering. Production logs were unavailable, and the reported release was not verified against the current checkout.
Possibly related issues
These concern adjacent invitation/workflow behavior, not confirmed duplicates:
Web verification was blocked before reproducing the issue: the Control workspace was created, but inviting the prerequisite members left only the owner in Members. This does not establish whether the reported approver bug occurs.
Step
Status
Create prerequisite workspace and membersControl plan confirmed, but Members showed only the owner after invitations; default approver and custom flow could not be configured.
@huult Melvin's analysis leaves open whether the pick is lost, filtered or replaced, but the reporter's video settles it: right after Invite the new member is listed under the picked approver (0:16), and once the server data arrives they move to the default approver (0:17). The code notes that the backend puts the members it adds into the default workflow, which is why the spreadsheet import follows up with a rules save, while the invite sends the pick only as submitsTo and saves no rule:
Changing the default approver away from the owner is what gives the default workflow rules of its own, so from then on those rules win over the invite's submitsTo and no new workflow appears. Saving a rule for the invited members after the invite, the way the import already does, keeps the choice without changing addMembersToWorkspace or its other caller.
Happy to put up a full proposal for this if that's useful.
Activity
applause-bot commentedon Dec 2, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/e72d481aa1f7b705a6368525e11eeab26a330ffe5feea302ff5e61e860af8a64
expensify-chore-bot commentedon Dec 2, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (
External)[-]Workflow-The approver selected while inviting a member not save if default approver not owner[/-][+][$175] Workflow-The approver selected while inviting a member not save if default approver not owner[/+]expensify-chore-bot commentedon Dec 2, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022128009809834859473
MelvinBot commentedon Dec 2, 2026
Findings
The current frontend preserves the selected approver rather than replacing it with the workspace default:
Code evidence
approverEmail: WorkspaceInviteMessageComponent.tsx:265–285.employees[].submitsTo: Member.ts:1239–1253.Alternative explanation: Approval-mode filtering can hide a nondefault workflow and display its members under the default approver, even if their stored selection remains correct: WorkflowUtils.ts:809–829. This could explain both symptoms, but the affected workspace’s approval mode is unknown.
Evidence needed before recommending a fix
Capture the failing invitation’s request, response, and resulting workspace state:
employees[].submitsTocontain the selected approver?approvalModeand applicable approval rules?These distinguish selection loss, server-side replacement, and display filtering. Production logs were unavailable, and the reported release was not verified against the current checkout.
Possibly related issues
These concern adjacent invitation/workflow behavior, not confirmed duplicates:
🤖 Web test steps verification results:⚠️ partial
Web verification was blocked before reproducing the issue: the Control workspace was created, but inviting the prerequisite members left only the owner in Members. This does not establish whether the reported approver bug occurs.
Create prerequisite workspace and members
Control plan confirmed, but Members showed only the owner after invitations; default approver and custom flow could not be configured.Invitation confirmation shows selected approver B
Not verified: prerequisite setup failed.Invited member retains approver B
Not verified: member D was not invited.Approvals shows D → B and preserves the existing flow
Not verified: required members and workflow were unavailable.Verify stored submitsTo and reload persistence
Not verified: request/response bodies were unavailable, and session rules prohibited reload.view run · view recording
yusufdeveloper2903 commentedon Dec 2, 2026
@huult Melvin's analysis leaves open whether the pick is lost, filtered or replaced, but the reporter's video settles it: right after Invite the new member is listed under the picked approver (0:16), and once the server data arrives they move to the default approver (0:17). The code notes that the backend puts the members it adds into the default workflow, which is why the spreadsheet import follows up with a rules save, while the invite sends the pick only as
submitsToand saves no rule:App/src/libs/actions/Policy/Member.ts
Lines 1365 to 1374 in 2c5d9e4
Changing the default approver away from the owner is what gives the default workflow rules of its own, so from then on those rules win over the invite's
submitsToand no new workflow appears. Saving a rule for the invited members after the invite, the way the import already does, keeps the choice without changingaddMembersToWorkspaceor its other caller.Happy to put up a full proposal for this if that's useful.