Shared Condition

An extension that runs a shared condition, created on the Shared extensions page, against the current issue (or issues related to the current issue) enabling or preventing a transition’s availability based on specified criteria.

This condition together with Shared extensions enables you to reuse the most frequently used configurations quickly without having to configure the same scenario multiple times. Any change made to a shared extension is instantly applied to all the workflow transitions where it is used.

To add the 'Shared condition' condition to a transition:

  1. Click Edit for the workflow that has the transition to which the condition should be added.

  2. In the Workflow Designer:

    1. If viewing the workflow as Text, click the name of the transition and click the Conditions tab.

    2. If viewing as a diagram, select the transition and click Conditions in the properties panel.

  3. Click Add condition.

  4. Select Shared condition from the list of conditions and click Add. The Shared condition screen (pictured, below) will open.

  5. Add the configuration details as specified in the Configuration details section, below.

  6. Click Add to add the condition to the transition.

  7. Publish the workflow.

You are viewing the documentation for Jira Data Center/Server.

On This Page

 

Configuration details

Add the following details to configure the condition to fit your scenario:

  • Shared condition: Select one of the shared conditions to be run. The list of shared conditions displayed here is defined in Shared extensions.

  • Error Handling: Make transition fail when an error occurs in this extension: Select this option to make the transition fail when an error occurs while running the condition. An error message is displayed to the user notifying them of the transition failure.

Example

Scenario: A workflow includes stages called Ready for QA and QA Complete; issues are moved to Ready for QA when ready to be tested, and QA Complete when testing is complete. The workflow also includes a transition called QA Complete between the two stages. The QA Complete transition should not be available to the same user who moved the issue into the Ready for QA stage; for example, developers can move issues to Ready for QA, but cannot move them to QA Complete.

Solution: The QA Complete transition should have a Separation of Duties condition applied.

Perform the following:

Step 1. Create a new Shared extension.

  1. Click the Administration button in the upper right corner and select Manage apps.

  2. Under JIRA MISC WORKFLOW EXTENSIONS click Shared extensions.

  3. Click the Conditions tab.

  4. Click Add shared condition to the right of the tabs.

  5. Add the following:

    • Condition name: Enter a meaningful name for the action.

    • Description: Enter a more detailed explanation of what the extension would accomplish.

    • Conditions: Add a condition:

      1. Click Add condition.

      2. Select Separation of Duties Condition from the list of conditions and click Add.

      3. For From Status select ‘In Progress’. In this example, this is the status before Ready for QA.

      4. For To Status select ‘Ready for QA'.

      5. Click Add.

  6. Click Save and the newly created condition is added to the Shared conditions list.

Step 2. Add the Shared Condition condition to the workflow transition

  1. Click Edit for the workflow that has the QA Complete transition.

  2. In the Workflow Designer:

    1. If viewing the workflow as Text, click the name of the transition (QA Complete) and click the Conditions tab.

    2. If viewing as a diagram, select the transition and click Conditions in the properties panel.

  3. Click Add condition.

  4. Select Shared condition from the list of conditions and click Add. The Shared condition window will open.

  5. Select the newly created shared condition you created in Step 1.

  6. Click Add to add the condition to the transition.

  7. Publish the workflow.

Figure 1 - Shared Condition condition

Â