Overview
The String list data type is an ordered list of strings. This data type is returned, among others, by functions that return values of string fields in a selection of issues (linked issues, sub-tasks, and subsets).
Fixed values
A string list can also be written in literal form using the following format: [string, string, ...].
Example
["Blue", "Green", "Yellow", "Orange", "Red"]
String list functions
The following functions are intended to build expressions that return string lists, strings or numbers.
Function | Input | Returned value |
---|---|---|
filterByCardinality(string list l, comparison operator operator, number n) | STRING []NUMBER | Returns a STRING [] in l whose cardinality (i.e., the number of times it appears in list l) satisfies the comparison cardinality operator n. Available comparison operators: |
filterByValue(string list l, comparison operator operator, string s) | STRING []STRING | Returns a STRING [] in l satisfying the comparison string_in_list operator s. |
filterByPredicate(string list l, boolean expression predicate) | STRING []BOOLEAN | Returns a STRING [] in l that validate predicate. Argument predicate is a boolean expression, where |
append(string list l, string list m) | STRING [] | Returns a STRING [] with all strings in arguments l and m. Duplicated string may appear in output. Use function union(l, m) instead, if you want to avoid repetitions. |
union(string list l, string list m) | STRING [] | Returns a STRING [] with all strings in argument l or in argument m without duplicated strings. |
except(string list l, string list m) | STRING [] | Returns a STRING [] with all strings in argument l which are not in argument m. Duplicated strings in l may appear in output. Use function distinct() to remove them if you need to. |
intersect(string list l, string list m) | STRING [] | Returns a STRING [] with all strings in argument l and m simultaneously. |
distinct(string list l) | STRING [] | Returns a STRING [] with all strings in list l without any duplication. |
count(string list l) | STRING [] | Returns the NUMBER of string values in l. |
count(string s, string list l) | STRINGSTRING [] | Returns the NUMBER of times s appears in l. |
first(string list l) | STRING [] | Returns the first element in STRING list l, or |
last(string list l) | STRING [] | Returns the first element in STRING list l, or |
nthElement(string list l, number n) | STRING []NUMBER | Returns element at position n in STRING list l, where n >= 1 and n <= count(l). Returns |
getMatchingValue(string key, string list key_list, string list value_list) | STRINGSTRING [] | Returns STRING 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, the element of value_list in position |
getMatchingValue(string key, string list key_list, string list value_list) | STRINGSTRING [] | Returns STRING value in value_list that is in the same position as numeric key is in key_list, or in case key doesn't exist in key_list and value_list has more elements than key_list, the element of value_list in position |
sublist(string list l, number indexFrom, number indexTo) | STRING []NUMBER | Returns a STRING [] with elements in l from indexFrom index to indexTo index. Having indexFrom >= 1 and indexFrom <= count(l) and indexTo >= 1 and indexTo <= count(l) and indexFrom <= indexTo. |
indexOf(string element, string list l) | STRINGSTRING [] | Returns the index NUMBER of string element in string list l. Zero is returned when element is not found in l. |
sort(string list l, order) | STRING [] | Returns a STRING [] with elements in l lexicographically ordered. Available orders are ASC (for ascending order) and DESC (for descending order). |
textOnStringList(string list strings, string text_expression) | STRING [] | Returns a STRING [] resulting of evaluating text_expression against each of the strings in argument strings. Argument text_expression is an expression that returns a string, where |
mathOnStringList(string list strings, number math_time_expression) | STRING [] | Returns a NUMBER [] resulting of evaluating math_time_expression against each of the issues in argument issues. Argument math_time_expression is a math/time expression, where |