Structure (Cloud)
Breadcrumbs

Sample Formulas - Versions and Sprints

Check for a specific fix version

fixVersions.CONTAINS("v1")

If the work item contains that fixVersion, returns 1 (true). Otherwise, returns 0 (false).

Get the latest/earliest fix version

fixVersions.UMAX_BY($.releaseDate) // latest

fixVersions.UMIN_BY($.releaseDate) // earliest

Find the largest time span of an affected version

affectedVersions.MAP(IF $.releaseDate AND $.startDate: $.releaseDate - $.startDate).MAX() 

For each Affected Version, subtracts the Start Date from the Release Date, and returns the Affected Version with the largest result.

Want the shortest result? Change MAX to MIN.

Show all versions referenced in the subtree

VALUES { ARRAY(fixVersions, affectedVersions).FLATTEN().UNIQUE() }

Get all fix versions with future release dates

fixVersions.FILTER($.releaseDate AND $.releaseDate > NOW())

Show all released affected versions

affectedVersions.FILTER($.isreleased)

Show all work items released during a set period of time

DATE(“0/Jan/2021”) < fixVersion.releaseDate

   AND fixVersion.releaseDate < DATE (“31/Mar/2021”)

Check that child work items and parent work items have the same Fixversion

with parentVersion = PARENT{FixVersion}:
  if(parentVersion and !parentVersion.contains(fixVersion); "version mismatch")

Display all sprints for child items

Returns any sprints that the work item’s child items are part of.

JOIN#distinct#subtree{sprint}