You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page

Use case

Add watchers to an issue from any field, be it, for example, the Assignee or the Reporter fields.

Using this combination of functions in several transitions will enable you to add several watchers if the user of the field changes, but not to remove them.

Configuration

Set up the custom field and the transitions that you are going to use.

Create a default User Picker (multiple users) field, and name it All watchers.

This field can remain hidden, that is, not added to any screen. It will not affect the outcome of this use case.

Create a global reflexive transition (a transition from any issue to itself).


Add a Update fields post function to any workflow transition but the global reflexive one. The Create issue transition can be a good choice here.

Target issue

Choose Current issue

Fields

Choose All watchers

Value

In the popup, choose the value Set field value manually (parser expression)

Expression

Enter the following expression:

%{union(union(toStringList(%{issue.cf10047}), toStringList(%{issue.assignee})), toStringList(%{issue.watcher}))

with parsing mode set to General.

Run as

Choose Current user

Add a Transition issue post function to the same transition as the previous post function.

Target issue*

Select Current issue

Mode*

Select Execute transition

Select the transition to be executed

Select the global reflexive transition previously created.

Delayed execution

Delay the execution of the post function 1000 milliseconds.

Add a

Source Field

Select All watchers

Destination Field

Select Watchers

If you still have questions, feel free to refer to our support team.