Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

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

UI Steps
sizelarge


UI Step


UI Expand
titleSet up the custom field and the transitions that you are going to use.


UI Steps



UI Step

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


text-box
ui-
typeinfo

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

ui-step

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






UI Step


UI Expand
titleSet up the Update fields post function.


UI Steps


UI Step

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.


UI Step

Target issue

Choose Current issue


UI Step

Fields

Choose All watchers


UI Step

Value

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


UI Step

Expression

Enter the following expression:

Code Block
languagebash
linenumberstrue
%{union(union(toStringList(%{issue.cf10001}), toStringList(%{issue.assignee})), toStringList(%{issue.watcher}))

with parsing mode set to General and replace the field code %{issue.cf10001} with the field code for the field All watchers

UI Text Box
typetip

As it is, the expression will take the value of the Assignee field. It could be changed for the Reporter field or for a custom User Picker field replacing the field code %{issue.assignee} with the one of your choice.



UI Step

Run as

Choose Current user






UI Step


UI Expand
titleSet up the Transition issue post function.


UI Steps


UI Step

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


UI Step

Target issue*

Select Current issue


UI Step

Mode*

Select Execute transition


UI Step

Select the transition to be executed

Select the global reflexive transition previously created.


UI Step

Delayed execution

Delay the execution of the post function 1000 milliseconds.






UI Step


UI Expand
titleSet up a Copy Value From Other Field post function


UI Steps


UI Step

Add a


UI Step

Source Field

Select All watchers


UI Step

Destination Field

Select Watchers











Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case" and ancestor in ("38569498","38569552")


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue




Page properties
hiddentrue


JWT feature

Workflow function

Update fields

Transition issue

Parser functions

union()

toStringList()

Label




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged


...