Skip to end of banner
Go to start of banner

Follow Up Transition Post Function

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 42 Next »

This is the JSU for Jira Cloud documentation. If you are using JSU on Jira Server or on Jira Data Center, see our JSU Server/Data Center documentation.

Description

The Follow Up Transition post function evaluates the workflow conditions of all the next transitions on the target status of the current transition, including global transitions. If exactly one transition is possible, that transition will be triggered as a follow-up. If more than one transition is possible, JSU cannot determine which to use as the follow up transition.

To learn more about global transitions in Jira workflows, see Atlassian’s advanced workflows documentation.

Configuration

The Follow Up Transition post function has no additional parameters to configure; however, you must have at least one workflow condition configured.

Consider the following workflow:

An example Jira workflow that includes a junction status that leads to three different follow-up transitions depending on the condition that is met.
  • Our issue has a mandatory number custom field.

  • At the end of the Go transition, we have configured a Follow Up Transition post function.

  • Each transition leading away from the status JUNCTION has a workflow condition:

    • Under Five has the condition: Number field < 5?

    • Exactly Five has the condition: Number field == 5?

    • Over Five has the condition: Number field > 5?

  • When the user performs the Go transition, this will always trigger a follow-up transition.

For example, if the user enters Number=3 during the Go transition, this leads to the IN PROGRESS status. If they enter 42, this leads to CLOSED.

We configured our workflow conditions so that always exactly only one condition can be true. This way, the user will never be stuck at the JUNCTION status.

Conditions

Let's continue the example from above, where a number field is evaluated. We will configure three conditions; one for each outgoing transition from the JUNCTION status.

Under Five

The Under Five condition.

Exactly Five

The Exactly Five condition.

Over Five

The Over Five condition.

Simple Yes / No example

A simpler use case is when there are only two transitions leading away and you evaluate the same condition; one condition is negated.

  • a == b? 

You can use Jira’s Value Field conditions for this setup.

Example Jira workflow with a junction status with only one condition that determines the follow up transition.
  • Check it: Follow Up Transition post function

  • Yes: Condition a == b?

  • No: Condition a != b?

Fast forward example

Some extra steps in your workflow might only be necessary if a condition is not fulfilled. Otherwise, that step could be skipped.

Example Jira workflow that uses a condition to bypass a step.

Management approval

See the Conditional Approval Process use case for another real-life example.

You can learn more about workflow conditions in Atlassian’s Configure Advanced Issue Workflows article.

Troubleshooting

Problem: Workflow is blocked at the Junction status

Cause: Not exactly one condition

Usually, the problem can be tracked down, by reviewing the expected outcome of the post function:
”If exactly one condition is valid, that transition will be triggered.”

It's important that you do your analysis with the same user that encountered the problem. There might be issues with permissions that could lead to a different result, depending on the user performing the transition.

If you look at an issue blocked at the Junction status: How many transition buttons does it have? Only if there is exactly one transition button, 'Follow up' will be triggered. If you have none or more than one transition button, you must review your workflow conditions on the transitions leading out from the Junction status.

If there is only one button, there might be something wrong with that following transition. For example, a validator could prevent the transition from getting completed. Try (with the same user, who got stuck in Junction) to click that button to see what happens.

Cause: Triggered transition fails

Another reason might be that the triggered transition does not run through. For example, if it has a validator that fails.

Infinite Loop Detection

An infinite loop can occur when executing the Follow Up Transition post function. An infinite loop results in an endless cycle of issue creation and follow-up transitions following the triggering of the origin issue. When a loop is detected JSU will stop the execution and log an execution failure.

When using post functions that create issues or follow-up transitions, consider the outcome of the rule and the user permissions of your project teams. You can also use preconditions to restrict when rules are run to reduce the likelihood of causing an infinite loop. Learn more about how JSU identifies an infinite loop in Infinite Loop Detection.

  • No labels