Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width30%
Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1

Column



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 whether "Assignee" is empty
  • %{00020} is code for field 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 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

Incoming Links
pageSet a field as a function of other fields
labelsexample

Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label = "post-function"