Features used to implement the example



Example: Assign issue to current user if assignee is empty

I would like to automatically assign issue to current user if assignee is empty, but if assignee is not empty, then nothing has to be done.

To implement this behavior we use post-function Set a field as a function of other fields. We have two options, since this post-function have two kind of setting rules: type 1, based in regular expressions, and type 2, which uses boolean expressions. I will explain both solutions:

Using type 1 setting rules, we use post-function Set a field as a function of other fields with the following configuration:


Note that:

  • ^$ is regular expression for empty string, and is used to check whether Assignee is empty
  • %{00020} is code for field Current user

There is a mistake in the screenshot of Solution 1: setting rule in the screenshot is (.*)%{00020} which is incorrect. Correct setting rule is: (^$)%{00020}

Once configured, transition "Create issue" will look like this:



I have used transition "Create issue" in the example, but you can implement this post-function in any transition of your workflow.

Alternative implementation

Using type 2 setting rules, we use post-function Set a field as a function of other fields with the following configuration


Notice that:

  • Value selected in parameter "Field to be checked for matching..." has no effect in this case, since we are only using a type 2 setting rule
  • %{00003} is code for field Assignee

  • %{00020} is code for field Current user

Once configured, transition "Create issue" will look like this:



I have used transition "Create issue" in the example, but you can implement this post-function in any transition of your workflow.



Other examples of that function



Related Usage Examples