Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

This configuration can be used to automatically transition an issue as soon as all related issues are in a specific status:




Configuration steps

UI Text Box
typeinfo

Post function placement

The post function has to be added to the transition that is used to close the related issues, not on the main issue's workflow!


UI Steps


UI Step

Target issue*

Select JWT expression

Code Block
%{linkedIssues("<link type 1>, <link type 2>")}


Expand
titlemore info...


UI Text Box
typetip

For the expression, the linkedIssues() expression parser function is used.

Replace <link type 1> and <link type 2> (or enter only one) with the link types you want to check for: Linked issue → <link type> → Main issue




UI Step

Mode*

Select Transition to status and Done as the status.

Expand
titlemore info...


UI Text Box
typeinfo

This is the status to which the main issue will then be transitioned.



UI Text Box
typenote

Please note that the transition of the correct target workflow is selected.



UI Step

Delayed execution*

Set it to 500.

Expand
titlemore info...


UI Text Box
typeinfo

Executing the post function will be delayed by 500 milliseconds.

500ms is the default value and should be completely fine for this use case.




UI Step

Run as*

Choose which user* will be used to execute the post function. By default, it is set to the Current user.

UI Text Box
typenote

The user must have all necessary permissions to execute the transition.



UI Step

Conditional execution

Select the Jira expression mode and insert the following expression:

Code Block
linenumberstrue
issue.links[0].linkedIssue.links
.filter(link => link.type.name == "<link type Relation>")
.every(link => link.linkedIssue.status.name == "<status>")


Expand
titlemore info...


UI Text Box
typetip

This expression is the important part of the post function. It does the following:

  • Grab the linked issue (since this post function is placed on the linked issue, this would return the main issue)
  • From that issue: Grab all issues that are linked with type <link type Relation>
  • From those linked issues: Check that all of them are in status <status>


Example:

  • Main issue
    • Linked issue 1
    • Linked issue 2
    • Linked issue 3
  • All 3 issues are linked with type <link type Relation>
  • As soon as all linked issues have been transitioned to <status>, the main issue will be transitioned to the status specified in step 2


You can find the name of the link type relation when going to your Jira Administration → Issue linking:


An example would be:

Code Block
linenumberstrue
issue.links[0].linkedIssue.links
.filter(link => link.type.name == "Relates")
.every(link => link.linkedIssue.status.name == "Done")






Related examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, LabelComplexity
sortByTitle
cqllabel = "use-case" and space = currentSpace() and ancestor = "38569507"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow functionTransition issue
Parser functionslinkedIssues()
Label
Use case descriptionAutomatically transition issue, if all linked issues are in specific status.
Complexity

Status
colourGrey
titleintermediate