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 Server/Data Center

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

...

Adapted definition from Wikipedia:

In Jira with JSU, a Precondition is a condition or predicate that must always be true just prior to the execution of a post function.

Configuration of Preconditions

Just like a Workflow Post-Functions, they preconditions will be executed after the transition screen has been submitted (and all validators have passed). However, a precondition will not modify any data, but perform some kind of check similar to Workflow Conditions and Workflow Validators .

The result of such a precondition then can be used in a later post function to decide , if that post function will be executed at all or not. Only JSU post functions of JSU are supported (no out-of-the-box post functions from Atlassian or any post functions of other plugins).Image Removedare supported for JSU preconditions.

...


Choose your Precondition

You have to configure preconditions in the same section as Workflow Post-Functions.

Thus as Jira administrator, you will choose and configure Preconditions similar to a Workflow Post-Functions:

...

Combine several Preconditions

You have to configure preconditions as separate steps in the workflow.Image Removed

...

You can combine several preconditions with a logical operator such as AND & OR. However, the concept of brackets is not supported. Instead, the preconditions will be evaluated sequentially, as they are configured in the workflow.

You can also negate the result of a precondition. Like this, if the check of a precondition was successful, the result of the precondition will be negated and result as false. In the opposite case, when the check of the precondition was not successful, but you negate the result, it will end up as: true.
This might give you some more flexibility in some cases. Instead of negating the result of the precondition, you might also choose to only perform the post function, if the precondition's result is false.Image Removed

...

Enable your Post Function to be

...

aware of Preconditions

By default, post functions are not aware of preconditions. They ignore any result of the preconditions.

If you would like a post function to be performed only if a precondition is true (or false), you have to configure that post function accordingly. At the beginning of the configuration screen of each post function from JSU, you will find a section like this:Image Removed

...

Here you can choose, if

  • The post function should ignore the result of any precondition.

  • The post function should only be performed if the precondition is true.

  • The post function should only be performed if the precondition is false.

This feature is only available for post functions from JSU. Post functions of 3rd party plugins are not supported.

...

Be aware that all the relevant preconditions must be evaluated before the post function, which relies on the result of those preconditions. Thus in the sequence of post functions/preconditions, you have to put the preconditions before the post function. See also the sample screenshot above with steps 5, 6, 7, and 8. If you use several preconditions, you must combine the result either with AND or with OR. Otherwise only the last (lowest in the configuration) precondition will be relevant.

You can use several post functions after a precondition. They all can use the result of the last previously executed precondition. Like this you can for example configure two post functions after your preconditions, one to be performed in case the precondition is true, and the other in case the precondition is false. This allows for a similar construct like IF / THEN / ELSE known in classical computer programming.