Auto populate user picker field based on expression screen
Navigate the Approvals administration screen and Add an Approval Configuration by inserting an Approval Name checking the Type Single Property option.
The Approval Configuration screen displays the available properties to setup an Approval.
Here you can choose a user picker custom field that can be populated basing on an expression.
On selecting a user picker All, distinct approbations will be requested to each user that will be inserted in the User Picker field.
On selecting a user picker Any, any user inserted in the User Picker custom field may provide the approval response on behalf of all users.
When selecting an user picker All or an user picker Any , you are able to specify expressions that identify
In order to insert an expression to populate the user picker field, click on the icon displayed on the right side of the select list filled with the chosen user picker:
Specify the expression identifying the users to insert in the user picker custom field
The Auto populate user picker field based on expression screen requires an expression, respecting the expected syntax, that specify the users to insert in the user picker field (Can Approve or Reject) and, optionally, the users to discard from the list (Excluded).
ℹ️ You cannot specify the users to discard (Excluded) without specifying the users to insert into to the user picker field (Can Approve or Reject).
You are able to insert the allowed tags on the text areas performing a drag and drop of a tag inside the text area on the point you want add it.
Notice that, in order to avoid performance issue there is a limit on the max number of users that will be returned by the two statements.
Case of the Can Approve or Reject or the Excluded statements returns more then 100 users, only the first 100 will be considered.
You are able to select the values to insert inside the property tags just starting to type a text.
Test the expression
You are able to test an expression in order to check if the list of users returned for an issue, on evaluating the Can Approve or Reject and Excluded, matches the expectations.
In order to test your expressions, you can specify an issue key, click on Run Test and Review the list of users that are returned.
The syntax that allows to specify the property's values expects a Start tag and an End tag.
The available tags are listed below:
<users>...</users>
<groups>....</groups>
<roles>....</roles>
<user-pickers>...</user-pickers>
<group-pickers>...</group-pickers>
<component-leads>...</component-leads>
Property Values
The admissible property's values depends by the selected Property.
The admissible values per property are listed below:
<users>
Username, any username
Reporter, key word to include in the list the issues's reporter
Assignee, key word to include in the list the issues's assignee
ProjectLead, key word to include in the list the concerned project lead
Component Leads, key word to include in the list all the concerned Component Leads
<groups>
<roles>
<user-pickers>
<group-pickers>
<component-leads>
You are able to specify one or more Property's values.
The property's values must be concatenated via the ','.
Example: <users>Tom Black , Nancy Green , Jack Red , Katy White</users>
The syntax that allows to specify a condition enabling a set of properties expect one of the following start end tag:
The admissible names include all Conditional Rule names that you have created via the Conditional Rules administration screen.
An expression can include zero, one, more conditions enabling one or more properties.
Example: <conditional-rule name="Priority High"><groups>Managers</groups> </conditional-rule> <conditional-rule name="Priority High" is-false><users>Tom Black</users></conditional-rule>