Match several values of a list

Use case

In this use case a User Picker (multiple users) custom field will be updated with one or several users depending on the labels contained in the Labels field.

🛠️ Configuration

Add the Update or copy field values post function to the desired transition or create a new transition.

Target issue

Choose Current issue

Field

Choose a User Picker (multiple values) field.

Value

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

Expression

Set it to Advanced text and use the following expression

Bash
" + " + toString(filterByPredicate(distinct([
"AA" in %{00080} ? "user.one" : null,
"BB" in %{00080} ? "user.one" : null,
"CC" in %{00080} ? "user.two" : null,
"DD" in %{00080} ? "user.two" : null,
"EE" in %{00080} ? "user.three" : null,
"FF" in %{00080} ? "user.three" : null
]), ^% != null))

The duplicated characters must be replaced with your labels and the different users (user.one, user.two, user.three), with the usernames of the users of your choice.

This expression will check if there are some labels in the issue. If there are, it matches the existing labels with one or several predefined users and removes the duplicated users and the empty values in the resulting list.

User

Choose Current user

Use case Workflow function Parser functions
Prioritize the issues globally

Update or copy field values

indexOf() previousValue() issuesFromJQL()

Automatically fill an insight custom field after a transition

Update or copy field values

Create an internal Service Management comment on linked issues

Update or copy field values

Set a date on the same week day on alternate weeks

Update or copy field values

addDays() nextDayOfTheWeek() modulus() weekOfTheYear() datePart()

Set a Date Picker field to the nth day of the month

Update or copy field values

dayOfTheMonth() lastDayOfTheMonth() addDays()

Set the next fix version

Update or copy field values

floor() toNumber() substring() length()

Set fix version based on its start and release date

Update or copy field values 

toString() textOnStringList() unreleasedVersions() startDates() releaseDates() first()

Set Due Date with latest value among sub-tasks

Update or copy field values

fieldValue()

max()

siblingSubtasks()

Assign important issues to the project lead

Update or copy field values

Shorten the summary to a maximum number of characters

Update or copy field values

substring() length()

Match several values of a list

Update or copy field values

toString() distinct() filterByPredicate()

Assign issue to current user

Update or copy field values

Keep parent issue's priority in sync

Update or copy field values

Set assignee based on a former assignee

Update or copy field values

previousValue()

Add watchers ignoring inactive users

Update or copy field values

usersInGroup() isActive() toString() filterByPredicate()

Add days skipping weekends and holidays to a Date Picker field

Update or copy field values

addTime()

Keep track of important status updates

Update or copy field values

Fields required or changed

dateTimeToString()

Change the assignee to the next evaluator

Update or copy field values

first()

toStringList()

Add or remove request participants

Update or copy field values