Adding extensions to transitions

Adding extensions

There are three ways to create an extension (a Post function, Condition, or Validator):

  1. Add it directly to a transition through the Jira Workflow Editor. Each extension documentation page has specific steps for this method, including configuration information specific to that extension.

  2. Use the Create new button on the JMWE Workflow Extensions administration page. See the Create new section for more details on this method.

  3. Copy an existing post function to a Shared Action. See below for more details on this method.
    Note: only post functions can be copied using this method.

Once an extension has been added to a transition, you must publish the workflow for the new extensions to take effect!

Post-function outcome may not be visible immediately

JMWE post-functions are processed remotely and communicate back with Jira to update the issue. This helps ensure the stability and performance of your Jira Cloud instance; however, this also means that some updates may occur in the background after the view issue page has reloaded. A workaround is to enable the "Auto-refresh Issue" feature in the JMWE Configuration page which auto-refreshes the View Issue Screen if a change made by a JMWE post-function is detected within 10 seconds after the Transition completes.

Copying post functions to a Shared Action

You can copy an existing post function to a Shared Action, creating a copy of the post function that can then be applied to any other transition in your Jira instance through the use of the Shared action post function. This is a particularly useful when you have created a complex post function on a single transition, and have determined that it can be used in multiple places within your Jira projects. To copy a post function to a Shared Action:

  1. In your Jira instance, click Settings in the upper right corner of the screen and select Issues.

  2. In the left-hand panel, click Workflows.

  3. For the workflow that contains the post function you want to copy, click the Action menu ( ) and select Edit.

  4. Open the transition that contains the post function.

  5. To the right of the JMWE post function name, click the Copy button (Figure 1, right).

  6. The Add to shared action dialog will open. Select an existing Shared action from the top pulldown menu, or enter the name of a new Shared action in Name. Click Confirm.

Placment of post functions

The position, or order, of a post-function in the list of post-functions for a transition is an important factor for its proper execution. When adding a new post function to a transition, you must move it to the appropriate position, which depends on the type of transition (a Create transition or a standard one) and the type of post function you configure. There are a few considerations:

 

Random post-function execution order

Due to the asynchronous nature of Connect post functions, it is not possible to guarantee the order in which post functions are executed. Therefore, you should ensure that your workflows do not depend on post functions being executed in a specific order. If a specific order is required, you can handle this using either the Sequence of Post functions post function to sure that a series of post-functions run in a predictable order during a transition. Alternately, you can use Delayed execution to delay the start of post functions that are dependent on the completion of others, but there is still no guarantee that the post function will execute in a specific order.

You are viewing the documentation for Jira Cloud.

 

Copy post function to Shared action button
Figure 1 - Copy post function to Shared action

 

 

Â