Supported list types

Number list

This function returns the numeric reference value or a given text. If the key is not in the keyList, the function returns NULL

Syntax
getMatchingValue(key, keyList, referenceList) #Output: Number
Examples
Parser expressionDescription
getMatchingValue("Three", ["One", "Two", "Three", "Four", "Five"], [1, 1+1, 3*1, 4, 4+1])

This example returns:

3

getMatchingValue("Critical", ["Normal", "High", "Critical"], [1, 5, 20])

This example returns:

20

getMatchingValue(%{issue.priority}, ["High", "Medium", "Low"], [3, 2, 1])

This example returns the correct number depending on the current priority.

This example could be used e.g. in the Update or copy field values post function to set a specific field depending on the current priority.

Additional information

Parameters used in this function

ParameterInput (data type)Description
key

TEXT

A text that exists in the keyList.
keyList

TEXT LIST

Any given text list.
referenceList

NUMBER LIST

Any given number list.
Output

This function returns a NUMBER


Variant with 2 number lists.

Syntax
getMatchingValue(key, keyList, referenceList) #Output: Number
Examples
Parser expressionDescription
getMatchingValue(5, [1, 3, 5, 7, 9], [1, 1+1, 3*1, 4, 4+1])

This example returns:

3

getMatchingValue(3, [1, 3, 5, 7, 9], [1, 1+1, 3*1, 4, 4+1])

This example returns:

2

Additional information

Parameters used in this function

ParameterInput (data type)Description
key

NUMBER

A number that exists in the keyList.
keyList

NUMBER LIST

Any given number list.
referenceList

NUMBER LIST

Any given number list.
Output

This function returns a NUMBER


Text list

This function returns the text reference value or a given text.

Syntax
getMatchingValue(key, keyList, referenceList) #Output: Text 
Examples
Parser expressionDescription
getMatchingValue("Spain", ["USA", "UK", "France", "Spain", "Germany"], ["Washington", "London", "Paris", "Madrid", "Berlin"])

This example returns:

"Madrid"

getMatchingValue(%{issue.issueType}, ["Task", "Sub-Task", "Story"], ["This is the description for a Task.", "Description for a Sub-Task", "Here comes the Story."])

This example returns the correct description depending on the current issue type.

This could be used e.g. in the Create issue or Update or copy field values post function to set the description depending on the selected issue type.

Additional information

Parameters used in this function

ParameterInput (data type)Description
key

TEXT

A text that exists in the keyList
keyList

TEXT LIST

Any given text list
referenceList

TEXT LIST

Any given text list
Output

This function returns a TEXT


Variant with a number list.

Syntax
getMatchingValue(key, keyList, referenceList) #Output: Text
Examples
Parser expressionDescription
getMatchingValue(8, [2, 4, 6, 8, 10], ["Washington", "London", "Paris", "Madrid", "Berlin"])

This example returns:

"Madrid"

Additional information

Parameters used in this function

ParameterInput (data type)Description
key

NUMBER

A number that exists in the keyList
keyList

NUMBER LIST

Any given number list
referenceList

TEXT LIST

Any given text list
Output

This function returns a TEXT