Breadcrumbs

Count outgoing links

📚

This template displays the number of outward links stemming from the current work item. E.g. the link “A blocks B” is counted in A, but not in B.

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

Configuration

To use the Count outgoing 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

Jira expression:

issue?.links.filter(link => link.direction == "outward").length

Display as

Number

Formatting style

Default (unformatted)

Details

1. What does the expression do?

The expression counts the number of outward links from the current work item. In other words, it tells you how many other work items this one is linked to as the source (for example, if "A blocks B", it counts for A).

2. Step-by-step breakdown

Let’s break it down:

  • issue?: Refers to the current work item.

  • .links: Accesses the list of all links associated with the current work item.

  • .filter(link => link.direction == "outward"): Filters this list to only include links where the direction is "outward" (meaning the current work item is the source of the link).

  • .length: Counts how many links remain after filtering—this is the number of outward links.

3. Examples

  • If a work item "A" has three links: "A blocks B", "A duplicates C", and "A is duplicated by D", only the first two are outward links (from A to another item). The expression would return 2.

  • If a work item has no outward links, the expression returns 0.

4. Real-life use cases

  • Identify work items that are heavily connected to others, which might indicate dependencies or bottlenecks.

  • Use in dashboards or reports to monitor the complexity or impact of specific work items.