Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Overview
The Number String list data type is an ordered list of numbersstrings. This data type is returned, among others, by functions that return values of number string fields in a selection of issues (linked issues, sub-tasks, and subsets).
Fixed values
A number string list can also be written in literal form using the following format: [numberstring, number string, ...].
Info | ||
---|---|---|
| ||
A number list with 5 elements: [ 1, -2, 3, 3.14, 2.71] |
"Blue", "Green", "Yellow", "Orange", "Red"] |
String list functions
The following functions are intended to build expressions that return number string lists, strings or numbers.
Function | Input | Returned value |
---|---|---|
filterByCardinality( |
string list l, comparison operator operator, number n) |
|
|
| Returns a |
|
|
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 |
[1, 4]
.filterByValue(number list l, comparison operator operator, |
string s) |
|
|
|
|
| Returns a |
|
|
in l satisfying the comparison |
string_in_list operator |
s. |
|
string containing substring "r". i.e., |
|
filterByPredicate( |
string list l, boolean expression predicate) |
|
|
|
| Returns a |
|
|
in l that |
validate predicate. Argument predicate is a boolean expression, where |
^
|
string values in argument l. |
|
[2, 4]
.
|
append(string list l, string |
list m) |
|
|
| Returns a |
|
|
strings in arguments l and m. Duplicated |
string may appear in output. Use function union(l, m) instead, if you want to avoid repetitions. |
|
|
|
|
|
|
|
|
with Fix Version/s of sub-tasks |
and blocking issues. |
union( |
string list l, |
string list m) |
|
|
| Returns a |
|
|
strings in argument l or in argument m without duplicated |
strings. |
|
|
|
except( |
string list l, |
string list m) |
|
|
| Returns |
a |
|
|
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. |
[1, 3, 5]
.
|
intersect(string list l, string |
list m) |
|
|
| Returns a |
|
|
strings in argument l and m simultaneously. |
|
|
|
distinct( |
string list l) |
|
|
| Returns a |
|
|
strings in list l without any duplication. |
|
|
|
|
|
the list of |
assignees to sub-tasks, with only one occurrence per |
user, although a user may have more than one |
sub-task assigned. |
count( |
string list l) |
|
|
| Returns the |
string values in l. |
|
|
|
. |
count( |
string s, |
string list l) |
|
|
|
|
| Returns the |
s appears in l. |
|
|
first(string |
3
. Status subtle true colour Blue title number []
Returns the sum of
values in l. Status colour Blue title number
Example: sum([1, 2, 3, 4, 5])
returns 15
.
Example: sum(fieldValue({00025}, subtasks()))
returns the total time spent in minutes in all sub-tasks of current issue.
Status subtle true colour Blue title number []
Returns the arithmetic mean of
values in l. Status colour Blue title number
Example: avg([1, 2, 3, 4, 5])
returns 3
.
Example: avg(fieldValue({00024}, linkedIssues("is blocked by")))
returns the mean of remaining times in minutes among blocking issues.
Status subtle true colour Blue title number []
Returns the maximum
value in l. Status colour Blue title number
Example: max([1, 2, 5, 4, 3])
returns 5
.
Example: max(fieldValue({00024}, linkedIssues("is blocked by")))
returns the maximum remaining times in minutes among blocking issues.
Status subtle true colour Blue title number []
Returns the minimum nu
value in l. Status colour Blue title number
Example: min([2, 1, 5, 4, 3])
returns 1
.
Example: min(fieldValue({00024}, linkedIssues("is blocked by")))
returns the minimum remaining times in minutes among blocking issues.
list l) |
|
|
| Returns the first element in |
|
|
or |
|
3
|
last( |
string list l) |
|
|
|
Returns the first element in |
|
|
or |
|
0
|
nthElement( |
string list l, number n) |
|
|
| Returns element at position n in |
|
|
7
|
getMatchingValue(string key, string list key_list, |
string list value_list) |
0
|
|
| Returns |
|
|
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 |
|
|
|
|
|
|
3
|
getMatchingValue(string key, string list key_list, |
string list value_list) |
|
|
|
|
| Returns |
|
|
|
|
|
|
|
|
3
|
sublist( |
string list l, number indexFrom, number indexTo) |
|
Returns a |
|
|
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) |
|
|
|
|
| Returns the |
index |
of string element in |
string list l. Zero is returned when element is not found in l. |
|
|
3
|
sort( |
string list l, order) |
|
|
| Returns |
a |
|
|
lexicographically ordered. Available orders are ASC (for ascending order) and DESC (for descending order). |
|
|
textOnStringList( |
string list |
strings, string text_expression) |
|
|
|
Returns a |
|
strings in argument |
strings. Argument text_expression is an expression that returns a string, where |
^
|
string in argument |
strings. |
|
["s", "sm", "smi", "smil", "smile"]
.
|
mathOnStringList(string list strings |
, number math_time_expression) |
|
|
| Returns |
a |
issues in argument |
issues. Argument math_time_expression is a math/time expression, where |
^
|
string in argument |
strings. |
|
|
Div | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|