Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
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:
|
...
|
...
|
...
|
...
Let's |
...
have a look at how this can be automated using preconditions with JSU. | |
Components |
How to configure this rule
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.
We want our automation to be executed on the
...
Create
...
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".
...
arrow that points to
to display the Options menu.Status title To Do Select Post Functions then select Add Post Function to display the list of available post functions.
Select the Update Any Issue Field (JSU) post function then select Add at the bottom of the page.
On the post function configuration page, select Add Precondition.
We want our preconditions to
...
ensure that only issues with issue type
...
, Story
...
and a
...
Summary containing
...
budget
...
text should be targeted for our post function execution.
...
...
Add the
...
...
...
and set
Issue Type = Story
Add the JQL precondition,
...
and define a query to ensure that only issues containing
...
budget
...
in their summary will be found
...
e.g.
key={issue.key} AND summary~budget
.
You can configure the above
...
preconditions using only
...
JQL. In this case, the search query would be:
key={issue.key} AND
...
summary~budget AND issuetype=
...
Story
. Use a configuration method that is simplest for you.
...
Always include the query
key={issue.key}
...
(or similar) on your JQL condition. This
...
ensures that JQL is performed on the current issue. For more details see JQL Precondition.
...
...
Configure the
...
post function
...
4. Save the configuration and publish our workflow.
5. See it in action!
...
.
Preconditions must be: set this to True.
Update field on all issues related as: select Within same issue.
Issue Field: select Component.
Field Value: enter
Budget
.
Select Add at the bottom of the page.
Publish the workflow.
Test the rule
To test our rule, we create an issue with issue type
...
Story
...
and call it
...
Budget for Hardware
...
.
...
When
...
we reload the issue, we can see that JSU
...
updated it with the component
...
Budget
...
.
...
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...