Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColor#f5f5f5
titleColor#ffffff
borderWidth0
titleBGColor#000000
titleJSU for Jira Cloud
Info

This is the documentation of JSU for Jira Cloud. If you are using JSU on Jira Server or on Jira Data Center, see this use case in the Server/Data Center documentation.

...

Preconditions allow you to execute a post function only under certain circumstances. This helps you create more complex behaviors on your post functions, enabling Jira to perform do more work for you. In JSU Cloud, preconditions are not separate post functions, but part of the post functions. You select your preconditions on the post function configuration screen.

Review the The following common use case to see explains how to get started with JSU preconditions for post functions.Most organizations use budget approval issues, which are usually managed manually. With our most popular precondition, you can automate

Goal

Automate your budget approval issues

Scenario

You want to organize your budget approval issues

...

using a project component.

...

We will use the

...

Update Any Issue Field post function to set the issue component to Budget, ONLY IF:

  • the issue summary contains the word

...

  • budget

...

  • and;

  • the issue type is

...

  • Story

...

  • .

Let's

...

have a look at how this can be automated using preconditions with JSU.

Components

How to configure this rule

  1. Create a draft of your project workflow. If you're unsure how to get to this page, follow the onboarding steps in Edit a Jira Workflow. You can then view your workflow in Text or Diagram mode. The steps in this use case represent Diagram mode. If you haven't already, switch the workflow viewer to Diagram mode.

  2. We want our automation to be executed on the

...

  1. Create

...

  1. transition, so we select the

...

Then, we choose the "Update Any issue field (JSU)" post function.

...

First, we want to configure our preconditions, so we click on "Add precondition".

...

  1. arrow that points to

    Status
    titleTo Do
    to display the Options menu.

  2. Select Post Functions then select Add Post Function to display the list of available post functions.

  3. Select the Update Any Issue Field (JSU) post function then select Add at the bottom of the page.

  4. On the post function configuration page, select Add Precondition.

    Choose precondition pageImage Added
  5. We want our preconditions to

...

  1. ensure that only issues with issue type

...

  1. , Story

...

  1. and a

...

  1. Summary containing

...

  1. budget

...

  1. text should be targeted for our post function execution.

...

  1.  

...

    1. Add the

...

    1. Value field

...

    1. precondition,

...

    1. and set Issue Type = Story

    2. Add the JQL precondition,

...

    1. and define a query to ensure that only issues containing

...

    1. budget

...

    1. in their summary will be found

...

    1. e.g. key={issue.key} AND summary~budget.

      (info) You can configure the above

...

    1. preconditions using only

...

    1. JQL. In this case, the search query would be: key={issue.key} AND

...

    1. summary~budget AND issuetype=

...

    1. Story. Use a configuration method that is simplest for you.

...

    1. (tick) Always include the query key={issue.key}

...

    1. (or similar) on your JQL condition. This

...

    1. ensures that JQL is performed on the current issue. For more details see JQL Precondition.

...

    1. Precondition configuration pageImage Added

...

  1. Configure the

...

  1. post function

...

4. Save the configuration and publish our workflow.

5. See it in action!

...

  1. .

    1. Preconditions must be: set this to True.

    2. Update field on all issues related as: select Within same issue.

    3. Issue Field: select Component.

    4. Field Value: enter Budget.

      Post function configuration with precondition set to TrueImage Added
  2. Select Add at the bottom of the page.

  3. Publish the workflow.

Test the rule

  1. To test our rule, we create an issue with issue type

...

  1. Story

...

  1. and call it

...

  1. Budget for Hardware

...

  1. .

...

  1. When

...

  1. we reload the issue, we can see that JSU

...

  1. updated it with the component

...

  1. Budget

...

  1. .

...

  1. Image Added

Demo Video

Watch the demo below to follow all the steps to get your preconditions to work for your post functionsview this rule in action.

Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width600px
urlhttps://www.youtube.com/watch?v=49sBJ2AjQX0&t=3s
height350px

...