User cannot take an action on behalf of other users if they are excluded from the group

Description

Scenario:

  • User A is a delegator, User B is a delegatee

  • Both users are in a group

  • User B starts the approval with the Group step (the group step has “exclude creator” option enabled)

Expected result:

User B cannot take an action as themselves (they are excluded as a creator), but they can take an action on behalf of User A.

Actual result (bug):

User B cannot take an action at all, even as a delegatee of User A.

Additional observations:

  • User B still receives “Call to action as delegatee” notification (which is correct behavour). What is more, if Actions without login option is enabled, they can actually take the decision as delegatee with the action button from the email.

  • In the presented scenario the user is excluded as creator, however the issue can be reproduced when they are excluded other way (for example as a user from user-picker field).


Change

  • A user excluded from a Group step (as the creator, through a user field exclusion, or chosen as excluded) can no longer decide as themselves, but can decide on behalf of a delegator who is an eligible approver of that step. This works in the approval panel, email buttons (also without login), Slack buttons, the Web API and Rovo.

  • The decision area shows only "Decide on behalf of <delegator>" for such a user, and no "You have active delegates for this step" line for their own delegations, since their delegates cannot act for them on that step.

  • Action links that need a login (Web API step links) name the person you decide for ("On behalf of") on the confirmation and completion pages. The vote confirmation names the delegator: "Your vote on behalf of <name> has been recorded."

Decisions

  • Exclusion applies to deciding as oneself only. Nobody can decide on behalf of a delegator who is excluded from the step, has already decided, is not in the group, or whose delegation is not active for that project/space and time.

  • An admin who edits a member's delegation to add themselves as a delegate can then decide on that member's behalf even when the admin is excluded from the step; the delegation history records the change.

  • Action links that need a login decide as yourself when you can. When you can only decide on behalf of one person, they decide for that person and name them. When you can decide on behalf of several people, the link does not decide and sends you to the work item (page) to choose.

Fixes included

  1. Delegates of an excluded user (for example the approval creator) are no longer asked to act on that user's behalf by email or Slack when a group step starts or in reminders.

  2. Action links that need a login no longer record a decision silently on behalf of the first of several delegators. A link decides only for the person it showed; if that changed since the page opened, it answers "The person you decide for on this step has changed since this page was opened. Open the link again."

  3. Opening a delegated login link again after deciding for someone records nothing and sends the user to the work item ("You decide on this step on behalf of several people..." message).

  4. The panel no longer offers delegators who have left the group.

Manual tester notes

  • Users A and B are in group G. A delegates to B for group G in this project. The definition has a Group step on G with "Exclude creator" on.

  • B starts the approval. As B, the decision area shows "Decide on behalf of A", with no option to decide as B and no "You have active delegates for this step" line. Approve: the step shows A's approval made by B as delegate.

  • Repeat with the creator exclusion off and B excluded through "Exclude users from field" (B in that user picker). Same result.

  • With "Actions without login" on, B gets the "Call to action as delegatee" email, and its Approve button records A's approval made by B.

  • A starts the approval instead. As B: B can decide only as themselves, there is no "on behalf of A", and B gets no delegatee email for A.

  • Open a login-required link for a user who decides on behalf of someone: the page names the delegator, the vote completion names them, and opening the link again after deciding sends you to the work item.