The Only users in a field of JWT DC is not yet available in JWT Cloud but can be implemented easily using a Jira expression condition.

Since JWT DC field codes are not available in conditions or validators in JWT Cloud, they have to be replaced by their Jira expression equivalent.

Migration steps

Build a matching Jira expression depending on the individual configuration, i.e. the respective field holds one or multiple users or one or multiple groups.

The following list provides examples for the most common scenarios.

Migration details

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))

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