Text key number list
This function returns the numeric reference value of a given text.
If this textKey does not exist in the textList, the function returns the last value of the referenceNumberList, if the referenceNumberList has one value more than the textList, otherwise null
getMatchingValue(textKey, textList, referenceNumberList) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns the correct number depending on the current priority. This example could be used e.g. in the Update fields post function to set a specific field depending on the current priority. |
|
Bash
|
This example returns: 20 |
|
Bash
|
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). |
|
Bash
|
This example returns: 3 |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
A text that exists in the textList. |
|
|
text list |
Any given text list. |
|
|
number list |
Any given number list. |
Output
This function returns a number
Number key number list
Variant with a numberKey and two number lists.
getMatchingValue(numberKey, numberList, referenceNumberList) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: 3 |
|
Bash
|
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). |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
A number that exists in the numberList. |
|
|
number list |
Any given number list. |
|
|
number list |
Any given number list. |
Output
This function returns a number
Text key text list
This function returns the text reference value of a given text.
If this textKey does not exist in the textList, the function returns the last value of the referenceTextList, if the referenceTextList has one value more than the textList, otherwise an empty text.
getMatchingValue(textKey, textList, referenceTextList) #Output: Text
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: "Madrid" |
|
Bash
|
This example returns the correct description depending on the current issue type. This could be used e.g. in the Create issue or Update fields post function to set the description depending on the selected issue type. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
A text that exists in the textList. |
|
|
text list |
Any given text list. |
|
|
text list |
Any given text list. |
Output
This function returns a text
Number key text list
Variant with a number list.
getMatchingValue(numberKey, numberList, referenceTextList) #Output: Text
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: "Madrid" |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
A number that exists in the numberList. |
|
|
number list |
Any given number list. |
|
|
text list |
Any given text list. |
Output
This function returns a text
(books) Use cases and examples
| Use case | JWT feature | Workflow function | Parser functions |
|---|---|---|---|
| Set the due date based on the priority |
|
Update fields | getMatchingValue() |
| Set the Assignee based on the Issue type |
|
Update fields | getMatchingValue() |
| Create a sub-task for each component |
|
toStringList() getMatchingValue() |