The condition Only users in a field is not yet available in JWT Cloud, but you can implement it easily using the Jira expression condition.
As described in A general note about JWT for Jira Cloud, it is not possible to use the JWT field codes in conditions or validators. That is the reason why JWT Cloud cannot provide a one-to-one mapping of the fields which can be selected in this condition.
Create a Jira expression condition
Depending on the individual situation, i.e. the respective field holds one user, multiple user, one group or multiple groups, one of the following expressions has to be entered.
User is in a field which holds a single user
Enter the Jira expression
FIELD.accountId == user.accountId
by replacing FIELD by the Jira expression field code of the respective field. It can be selected using the field injector of the JWT expression editor.
In case - e.g. when using a text field - FIELD contains user name, accountId
has to be replaced by displayName
for the right-hand operand in the expression shown above.
User is in a field which holds multiple users
Enter the Jira expression
FIELD.includes(user.accountId)
by replacing FIELD by the Jira expression field code of the respective field. It can be selected using the field injector of the JWT expression editor.
Please note, that the respective field must hold an Atlassian user.
In case - e.g. when using a text field - FIELD contains only user names, accountId
in the expression has to be replaced by displayName
.
User is in a field which holds one group
Enter the Jira expression
user.groups.includes(FIELD)
by replacing FIELD by the Jira expression field code of the respective field. It can be selected using the field injector of the JWT expression editor.
User is in a field which holds multiple groups
Enter the Jira expression
user.groups.some(ug=>FIELD.includes(ug))
by replacing FIELD by the Jira expression field code of the respective field. It can be selected using the field injector of the JWT expression editor.
Example:
user.groups.some(ug=>issue?.customfield_10058?.map(g => g.name).includes(ug))