Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Supported list types

Table of Contents
exclude(Supported list types).*
stylecircle
typeflat
separatorpipe

Number list

UI Text Box
sizemedium
typeinfo

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

Status
subtletrue
titlenull

Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(key, keyList, referenceList) #Output: Number
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
getMatchingValue("Three", ["One", "Two", "Three", "Four", "Five"], [1, 1+1, 3*1, 4, 4+1])

This example returns:

3

Code Block
languagebash
linenumberstrue
getMatchingValue("Critical", ["Normal", "High", "Critical"], [1, 5, 20])

This example returns:

20

Code Block
languagebash
linenumberstrue
%{getMatchingValue("None", ["Normal", "High", "Critical"], [1, 5, 20, 0])}

This example returns 

0

The textKey "None" is not available in the textList, so the last value of the referenceNumberList is returned (it has one more value than the textList).

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

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

UI Text Box
typeinfo

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.

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
key

Status
subtletrue
titletext

A text that exists in the keyList.
keyList

Status
subtletrue
titletext list

Any given text list.
referenceList

Status
subtletrue
titlenumber list

Any given number list.
UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber


UI Text Box
sizemedium
typeinfo

Variant with 2 a key and two number lists.

Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(key, keyList, referenceList) #Output: Number
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
getMatchingValue(5, [1, 3, 5, 7, 9], [1, 1+1, 3*1, 4, 4+1])

This example returns:

3

Code Block
languagebash
linenumberstrue
%{getMatchingValue(3, [1, 3, 5, 7, 9], [1, 1+12, 3*1, 4, 4+199])}

This example returns:2

99

The numberKey 3 is not available in the numberList, so the last value of the referenceNumberList is returned (it has one more value than the numberList).

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
key

Status
subtletrue
titlenumber

A number that exists in the keyList.
keyList

Status
subtletrue
titlenumber list

Any given number list.
referenceList

Status
subtletrue
titlenumber list

Any given number list.
UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber


Text list

UI Text Box
sizemedium
typeinfo

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

Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(key, keyList, referenceList) #Output: Text 
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
getMatchingValue("Spain", ["USA", "UK", "France", "Spain", "Germany"], ["Washington", "London", "Paris", "Madrid", "Berlin"])

This example returns:

"Madrid"

Code Block
languagebash
linenumberstrue
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.

UI Text Box
typeinfo

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.

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
key

Status
subtletrue
titletext

A text that exists in the keyList
keyList

Status
subtletrue
titletext list

Any given text list
referenceList

Status
subtletrue
titletext list

Any given text list
UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext


UI Text Box
sizemedium
typeinfo

Variant with a number list.

Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(key, keyList, referenceList) #Output: Text
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
getMatchingValue(8, [2, 4, 6, 8, 10], ["Washington", "London", "Paris", "Madrid", "Berlin"])

This example returns:

"Madrid"

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
key

Status
subtletrue
titlenumber

A number that exists in the keyList
keyList

Status
subtletrue
titlenumber list

Any given number list
referenceList

Status
subtletrue
titletext list

Any given text list
UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext

Page properties
hiddentrue

Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short description

Returns a custom reference value for a given or text or number

Output

Status
subtletrue
titlenumber
 
Status
subtletrue
titletext

Available since

Status
subtletrue
colourBlue
title2.2.25

Label