Creating and Reordering Workspace Groups

Helpdocs Admin Updated by Helpdocs Admin

This article covers the payloads used to create a group and to move an existing group's position within a workspace. For an explanation of how positioning and anchors work in general, see How Workspace Ordering Works.

Creating a group

export interface InitializeWorkspaceGroup {
readonly name: string;
readonly description?: Nullable<string>;
readonly colour: WorkspaceColour;
}

export interface CreateWorkspaceGroup extends InitializeWorkspaceGroup {
readonly movement: WorkspaceGroupAction;
}

When creating a group, you provide its basic details (name, optional description, colour) along with a movement, which tells the server where the new group should be placed relative to the workspace's other groups.

The WorkspaceGroupAction payload

export interface WorkspaceGroupAction {
readonly operator: WorkspaceMovement;
readonly anchorBeforeEntityId?: string;
readonly anchorAfterEntityId?: string;
}

Field

Description

operator

One of the WorkspaceMovement values below, describing the type of move.

anchorBeforeEntityId

Optional. The ID of the group you want to end up before.

anchorAfterEntityId

Optional. The ID of the group you want to end up after.

WorkspaceMovement values

export type WorkspaceMovement = 'move-between' | 'move-top' | 'move-bottom';

  • move-top — places the group at the very top of the workspace. Anchors aren't needed for this operation.
  • move-bottom — places the group at the very bottom of the workspace. Anchors aren't needed for this operation.
  • move-between — places the group relative to one or both anchors (anchorBeforeEntityId and/or anchorAfterEntityId). You can specify either one or both; the server resolves the exact position from whichever anchors are provided.

Reordering an existing group

The same WorkspaceGroupAction payload is used to move a group you've already created — simply send the desired operator and anchor(s) for the group you want to reposition.

Anchor resolution and fallback

If neither anchor can be found (for example, the referenced group has since been removed), the move falls back to the bottom of the workspace rather than failing. See How Workspace Ordering Works for the full reasoning behind this behavior and its concurrency guarantees.

How did we do?

How Workspace Ordering Works

Adding and Reordering Tickets in a Workspace Group

Contact