Breadcrumbs

Count work item links

πŸ“š

This template displays the number of work item links stemming from the current work item.

Note that this counts the links themselves, not distinct linked work items, which might be fewer.

Configuration

To use the Count work item links template, simply select it from the template grid. Filter by Link to find it faster.

Parameters

This template does not require any additional parameter configuration.

Expert mode

If you switch to Expert mode you can see the formula field in the Expression Parser. You can now tweak the expression to create a custom formula field based on this template.

Expression

General expression:

%{issue.links.length}

Display as

Number

Formatting style

Default (unformatted)

Details

1. What does the expression do?

The expression counts the total number of links associated with the current work item. This means it tells you how many links this work item has to other work items, regardless of whether some links point to the same work item.

2. Step-by-step breakdown

  • %{issue.links.length}: Refers to the number of links from the current work item.

3. Examples

  • If a work item has 3 links to other work items, the expression will return 3.

  • If a work item has no links, the expression will return 0.

  • If a work item has 5 links, but 2 of them point to the same work item, the expression will still return 5 (it counts links, not unique work items).

4. Real-life use cases

  • Workload analysis: If you want to identify work items that are highly connected (and possibly more complex), you can use this count to flag them.

  • Reporting: In dashboards or reports, you might want to display the number of links for each work item to give an overview of how interconnected your work items are.