This post function allows users to add/remove watchers to/from the current, parent, selected or any issue returned by a parser expression.

You can retrieve the users from either an existing field, project role, or group.

Configuration

Select the issue to add or remove watchers. If a list of issue keys is passed, the function will be performed for every issue in the list.
The following options are available:

  • Current issue
  • Parent of current issue
  • Selected issue
  • Parser expression

When the option parser expression is selected, an expression parser input field is displayed and the input has to be an issue key or an issue list. The watchers will be added or removed to the issues specified by the given issue keys.

The mode parameter defines how you want to retrieve the users to be added or removed as watchers. The following modes are available:

OptionDescription
Add users from a field

You will be presented with a dynamic selection, containing available fields (or field codes) where the user(s) should be retrieved from. 

If you select a text field, the output must contain a single or comma separated list of Atlassian account Ids.

Add members of a project role

You will be presented with a dynamic selection, containing available project roles.

All users from the selected project role (in the current project) will be added as watchers.

Add members of a group

You will be presented with a dynamic selection, containing available groups.

All users from the selected group will be added as watchers.

Remove users from a field

You will be presented with a dynamic selection, containing available fields (or field codes) where the user(s) should be retrieved from. 

If you select a text field, the output must contain a single or comma seperated list of Atlassian account lds.

Remove members of a project role

You will be presented with a dynamic selection, containing available project roles.

All users from the selected project role (in the current project) will be removed as watchers.

Remove members of a group

You will be presented with a dynamic selection, containing available groups.

All users from the selected group will be removed as watchers.

Remove all watchersCheck this option to remove all watchers from the current issue.

If you need to add or remove watchers from multiple groups or project roles, you need to configure additional post functions.

Select the user that will be used to execute the post function. By default, it is set to the current user that executes the transition.

The following options are available:

OptionDescription
Selected userSelect a specific Jira user.
User in field

Select the field containing the user that will be used to execute the post function.

The configured user must have all necessary permissions to add or remove watchers in the target issue.

You can optionally specify a logical expression or a Jira expression depending on the chosen Parsing mode to define the circumstances (or conditions) under which the post function should be executed.

The result of the logical expression must return a boolean value of either:

  • true → the post function will be executed
  • false → the post function will not be executed

Using the conditional operator, even complex or multi-layered conditions can be constructed.

Make sure to learn more about defining logical expressions and browse through the various examples here: Logical mode


Use cases and examples


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