The modal to show group members does not show any users if group approval was started with "Work item field - Group" step

Description

The modal to show group members fails not display any users if group approval was started with Work item field - Group step.

Note: the issue does not affect regular group steps.

Change

  • The group members dialog of a "Work item field - Group" step lists the members of the group set in the work item field, with excluded users marked, as for a regular group step.

  • The panel, the details view and the approvals lists now tell a group set in a group field apart from the users of a "Work item field - User" step treated as a group.

  • A "Work item field - User" step with "Treat users as a group" and dynamic updates off, whose field was empty when the step started, no longer says it waits for the field. The app does not re-read that field, so the panel now says "Currently group is empty. No one can decide on this step." and the lists show "Blocked" instead of "Waiting for <field>".

Decisions

  • The frontend reads the step's own flags from the backend (whether the group comes from a user field, and whether the step waits for its field) instead of guessing from the field name and the stored members. No database change.

  • "Waiting for the field" means what the backend already uses: dynamic updates on and the field empty.

Fixes included

  1. The Active step column of the approvals list and of Delegate usages showed "Waiting for <field>" for an active "Work item field - Group" step; it now shows the step name.

  2. A blocked "Work item field - Group" step now shows its blocked message in the panel and "Blocked" in the lists.

  3. An empty group from a "Work item field - Group" step said "Waiting for <field> field to be populated"; it now says "Currently group is empty. No one can decide on this step."

  4. Opening the approval version select near the bottom of a long list in the work item sidebar panel no longer moves the sidebar back to the top of the list.

Manual tester notes

  • Create a definition with a "Work item field - Group" step on a group picker field, set the field on a work item to a group with a few members and start the approval.

  • In the work item panel, click the group icon of the step: the dialog lists the group's members; with "Exclude approval creator" on, the creator is marked "(excluded)".

  • Open the Approvals page: the Active step column shows the group and field name, not "Waiting for ...".

  • Set the field to a group with no members and start an approval: the panel says "Currently group is empty. No one can decide on this step."

  • Use a "Work item field - User" step with "Treat users as a group", dynamic updates off and "Skip when empty" off, leave the field empty and start an approval: the panel says "Currently group is empty. No one can decide on this step." and the Approvals page shows "Blocked", not "Waiting for <field>".

  • Regression: for a "Work item field - User" step with "Treat users as a group", the dialog lists the users from the field. With dynamic updates on and an empty field, the panel says "Waiting for <field> field to be populated" and the Approvals page shows "Waiting for <field>".

  • Regression: a regular group step's dialog still lists the group's members.

  • Open a work item with 10 or more approvals in the Approval Path panel of the right sidebar (Apps section), reload, scroll the sidebar down to an approval with several versions and open its version select: the sidebar stays where it is and the versions open below the select; picking an older version shows the historical version notice.