Click Edit for the workflow that has the transition you wish to configure the condition on.
In the Workflow Designer, select the transition.
Click on
Conditions
in the properties panel.Click on
Add condition
.Select
Build-your-own (scripted) Condition
from the list of conditions.Click on
Add
to add the condition on the transition.Input a Jira expression in the
Jira expression
field.For information on how to write a 'Jira expression' see How to insert information using Jira expressions.
Click on
Add
to add the condition to the transition.
Common mistakes while using this condition:
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|
Other related articles
Use case
A typical use of this workflow condition is to hide the transition when a field of the issue has a specific value or the current user belongs to a specific group.
Consider a use case where you want to show the “Approve” transition only when the current user is in the “Approvers” field. To configure this:
Add the “Build) condition” to the “Approve” transitionInput the following code under “Jira Expression”
Code Block |
---|
!! issue.customfield_10002 && issue.customfield_10002.some(it => it == user) |
Note it is suggested to use the “Issue Fields” tab of the Jira expression editor, select the field from the list and the Jira expressions editor help system shows examples on accessing and testing the field value.