Preconditions for Post Functions

JSU for Jira Cloud

This is the documentation of JSU for Jira Cloud. If you are using JSU on Jira Server or on Jira Data Center, you can find the documentation here.

Preconditions allow you to execute a post function under certain circumstances only. This helps you create a complex behaviour on your post functions, enabling you to let Jira perform more work for you.

In JSU Cloud, preconditions are not separate post functions, but part of the post functions. Now you select your preconditions on the post function configuration screen.

Check out a very common use case, and get started with JSU preconditions for post-functions.

Every organisation employs budget approval issues, which are usually managed manually. You can now automate your budget approval issues with the most popular JSU preconditions for post functions.

In this case we will use the "Update any issue field" post function to set component to Budget, ONLY IF the issue summary contains the word "budget" and the issue type is "Story".

Let's get started! Check the Demo video or the quick overview below:

1. Add the post function and select your precondition

  • We want our automation to be executed on the "Create" transition, so we select the transition from the diagram view in Jira's workflow configuration and click to add a post function.
  • Then, we choose the "Update Any issue field (JSU)" post function.
  • First, we want to configure our preconditions, so we click on "Add precondition".

2. Configure the preconditions

What we want our preconditions to do for us is to make sure that only issues with issue type "Story" and summary containing "budget" text should be targeted for our post function execution.

  • Therefore, with the "Value field" precondition we define the issue type.
  • With the JQL precondition we make sure that only issues containing "budget" in their summary will be found by the query.

Note: Users have the option to configure the above-mentioned preconditions only by using JQL. In this case the search query would be: key={issue.key} AND summary~"budget" AND issuetype=Story . Feel free to use the way of configuration, which is the simplest for you.

Important! Always make sure you include the query key={issue.key} (or similar) on your JQL condition. This way you ensure that JQL is performed on the current issue. For more details see TOP TIPS.

3. Configure the execution

  • Then, we continue with the execution by configuring our post function to add a component "Budget" to our issues satisfying the preconditions.
  • Finally we save the configuration of the post function and publish our workflow.

4. See it in action!

  • We create an issue with issue type "Story" and call it "Budget for Hardware".
  • When following the link to reload the issue, we can see JSU did update it with the component "Budget".

Watch the demo below to follow all the steps to get your preconditions work for your post functions.

Need more Information or help? Check the JSU documentation on preconditions for post functions or Get in touch!

Demo Video

Watch this video to see all of this in action: