This template displays the number of affected versions in the current work item.
If there are no affects versions, 0 will be displayed.
Configuration
To use the Count affected versions template, simply select it from the template grid. Filter by Version 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.versions.length}
Display as
Number
Formatting style
Default (unformatted)
Details
1. What does the expression do?
The expression counts how many affected versions there are in the current work item. If there are no affected versions, it returns 0.
2. Step-by-step breakdown
-
%{issue.versions.length}: Refers to the number of affected versions in the current work item.
3. Examples
-
If a work item has 3 affected versions, the expression will return
3. -
If a work item has no affected versions, the expression will return
0.
4. Real-life use cases
-
Release management: Quickly see how many versions are impacted by a bug or feature request.
-
Reporting: Create dashboards or reports that show the number of affected versions for each work item.