Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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

Page properties
hiddentrue
Short description

Returns a number or text value in value_list that is in the same position as key is in key_list.

Output Statussubtletruetitlenumber/textAvailable since

Status
subtletrue
colourBlue
title2.2.25

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 value in value_list that is in the same position as string key is in key_list, or in case key doesn't exist in key_list and value_list has more elements than key_list, then the element of value_list  is in position count(key_list) + 1.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(string key, string list key_listkeyList, number list value_listreferenceList) #Output: numberNumber


UI Expand
titleExamples


number: 3
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
xxxkey

Status
subtletrue
titledata typetext

A text that exists in the keyListParameter description.
xxxkeyList

Status
subtletrue
titledata typetext list

Any given text listParameter description.
xxxreferenceList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant where argument key_list is a number listwith a key and two number lists.


Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(string key, number list key_listkeyList, number list value_listreferenceList) #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 the number:

3


Code Block
languagebash
linenumberstrue
%{getMatchingValue(3, [1, 5, 7, 9], [1, 2, 3, 4, 99])}


This example returns:

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
xxxkey

Status
subtletrue
titledata typenumber

A number that exists in the keyListParameter description.
xxxkeyList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.
xxxreferenceList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber



Text list

UI Text Box
sizemedium
typeinfo

This function returns the text value in value_list that is in the same position as text key is in key_list, or in case key doesn't exist in key_list and value_list has more elements than key_list then, the element of value_list in position count(key_list) + 1 reference value or a given text.


Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(string key, string list key_listkeyList, string list value_list)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 the following text:

"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
xxxkey

Status
subtletrue
titledata type

Parameter description.

text

A text that exists in the keyList
keyListxxx

Status
subtletrue
titledata type

Parameter description.

text list

Any given text list
referenceListxxx

Status
subtletrue
titledata typetext list

Any given text listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext




UI Text Box
sizemedium
typeinfo

Variant where argument key is a number and argument key_list is with a number list.


Code Block
languagebash
titleSyntax
linenumberstrue
getMatchingValue(number key, number list key_listkeyList, string list value_listreferenceList) #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 the following text:

"Madrid"



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxkey

Status
subtletrue
titledata type

Parameter description.

number

A number that exists in the keyList
keyListxxx

Status
subtletrue
titledata type

Parameter description.

number list

Any given number list
referenceListxxx

Status
subtletrue
titledata typetext list

Any given text listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_getmatchingvalue" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloudgetMatchingValue()
Map(tick)
Notes




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