Versions Compared

Key

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

A workflow condition that hides/shows a transition based on the result

of 

of a Jira expression

The transition to which the condition is added will be available only if the Jira expression returns true. This can be used to test or compare issue fields, to test linked issues, to check for open Sprints, etc.

When you add this condition to a transition, the add-on extension checks the result of the Jira expressiona logical test, comparing a field value to either another field value or to a set value. The logical test can be a Jira expression entered manually, or you can build an expression using the No Code option (see below). If the expression returns true, the transition will be available to the user, and ; if it returns false or a non-boolean Boolean value, the transition will be hidden.

Include Page
[Includes] Add Condition
[Includes] Add Condition

Configure the condition

  1. Follow the steps above to add a condition to a transition.

  2. From the list of validators, select Build-your-own (scripted) Condition (JMWE app).

  3. The Build-your-own (scripted) Conditionpage will open (Figure 1, right). Configure the condition as needed, setting the options for the description and :

    1. Set the Description.

    2. For Choose type, select either No Code or Jira Expression as the method of creating the logical test. See below for details on each of the configurations.

  4. Click Add.

Note

Note that you will need to publish the workflow for the new validator Condition to take effect.

The following configurations are available:

  • Description - Give the condition a description; this will be included in the list of conditions for the transition and in the Workflow Extensions administration page.

  • No Code (Figure 1, right) - These fields will only display when Choose type is set to No Code. Select this option to create the condition without the need to write a Jira expression. Set each of the following options:

    • Field - Select the field to be tested.

    • Operator - Select the logical operation to use in the test; for example, Equals, Does not equal, is empty, Less than, or Greater than (among others).

    • Value to compare type - Select against what value the test will be evaluated:

      • Field - Compare the condition field against the value(s) of another field.

      • Text - Compare the condition field against a set value.

    • Value to compare - Either select a field from the pulldown menu, or enter a set value.

  • Jira Expression (Figure 2, right) - The Jira expression editor will only display when Choose type is set to Jira Expression. Enter the Jira expression for the logical test for the validatorcondition. If this test evaluates to false, the validator condition will fail and prevent the transition from executing. Enter a Jira expression.will not be available for selection.

Tip

Computed Expressions

Computed Expression field showing the JavaScript result of configurationsImage Added

If you use the No Code option to create your condition, the Computed Expression box (Figure 3, right) will populate with the equivalent Jira expression for your configurations. You will not be able to alter the script, but it is possible to test the script and to copy the script so it can be pasted elsewhere.

Click Test ( testscript.pngImage Added ) to open a window where you can select an issue against which the script should be tested.

Click Copy ( copyscript.pngImage Added ) to copy the script to your clipboard.

Info

You are viewing the documentation for Jira Cloud.

Build-your-own Condition No Code Configuration ScreenImage AddedBuild-your-own Condition Jira Expression Configuration ScreenImage Added