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
titleExample
A number list with 5 elements: [1, -2, 3, 3.14, 2.71]
Number
"Blue", "Green", "Yellow", "Orange", "Red"]

String list functions

The following functions are intended to build expressions that return number string lists, strings or numbers.

FunctionInputReturned value
filterByCardinality(
number
string list l, comparison operator operator, number n)

Status
subtletrue
colour

Blue

Yellow
title

number

String []
Status
colourBlue
titlenumber

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

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: =, !=, <, <=, > and >= .
Example: filterByCardinality([

1, 1, 2, 3, 4, 4, 4, 5], >, 1)

"tiger", "tiger", "tiger", "tiger", "lion", "lion", "lion", "cat", "cat", "lynx"], <, 3) returns ["cat", "lynx"] .
Example: filterByCardinality(fieldValue(%{...components}, subtasks()), =, count(subtasks())) returns a list with the Components present in all sub-tasks, i.e., those components common to all sub-tasks of current issue.

filterByValue(string
returns the following number list: [1, 4] .filterByValue(number
list l, comparison operator operator,
number n
string s)

Status
subtletrue
colour

Blue

Yellow
title

number

String []
Status
colour

Blue

Yellow
title

number

String

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []

 

in l satisfying the comparison

number

string_in_list operator

n

s.
Example: filterByValue([

1, 2, 3, 10, 11, 25, 100], >, 10

"John", "Robert", "Kevin", "Mark"], ~, "r") returns the list of

numbers greater than 10

string containing substring "r". i.e., [

11, 25, 100

"Robert", "Mark"]

filterByPredicate(
number
string list l, boolean expression predicate)

Status
subtletrue
colour

Blue

Yellow
title

number

String []
Status
colourGreen
title

boolean

BOOLEAN

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []

 

in l that

validates a 

validate predicate. Argument predicate is a boolean expression, where

^

^% is used for referencing

numeric

string values in argument l.
Example: filterByPredicate([

1, 2, 3, 4], ^ > 2) returns values greater than 2, i.e., [3, 4

"book", "rose", "sword"], length(^%) > 4) returns ["sword"] .
Example: filterByPredicate([

1, 2, 3, 4], remainder(^, 2) = 0) returns even values, i.e., [2, 4] .

"book", "rose", "sword"], ^% in %{...summary} OR ^% in %{...description}) returns a list with those strings in first argument that also appear in issue Summary or Description.

append(string list l, string
append(number list l, number
list m)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with all

numbers

strings in arguments l and m. Duplicated

numbers

string may appear in output. Use function union(l, m) instead, if you want to avoid repetitions.
Example: append([

1, 2, 3

"blue", "red", "green"], [

3, 4, 5

"red", "green", "yellow"]) returns [

1, 2, 3, 3, 4, 5

"blue", "red", "green", "red", "green", "yellow"].
Example: append(fieldValue(%{

00025

...fixVersions},

linkedIssues

subtasks(

"is blocked by"

)), fieldValue(%{

00025

...fixVersions},

subtasks

linkedIssues("is blocked by"))) returns a string list

of numbers with Total Time Spent (in minutes) in blocking issues and

with Fix Version/s of sub-tasks

. This number list can be summed using function sum().

and blocking issues.

union(
number
string list l,
number
string list m)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with all

numbers

strings in argument l or in argument m without duplicated

numbers

strings.
Example: union([

1, 2, 3

"blue", "red", "green"], [

3, 4, 5

"red", "green", "yellow"]) returns [

1, 2, 3, 4, 5]

"blue", "red", "green", "yellow"].
Example: union(fieldValue(%{...fixVersions}, subtasks()), fieldValue(%{...fixVersions}, linkedIssues())) returns the list of Fix Version/s selected among all sub-tasks and linked issues.

except(
number
string list l,
number
string list m)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns

a

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with all

numbers

strings in argument l which are not in argument m. Duplicated

numbers

strings in l may appear in output. Use function distinct() to remove them if you need to.
Example: except([

1, 2, 3, 4, 5], [2, 4]) returns [1, 3, 5] .

"blue", "red", "green", "black"], ["red", "green", "yellow"]) returns ["blue", "black"] .
Example: except(fieldValue(%{...fixVersions}, subtasks()), fieldValue(%{...fixVersions}, linkedIssues())) returns the list of Fix Version/s in sub-tasks and not in linked issues.

intersect(string list l, string
intersect(number list l, number
list m)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with all

numbers

strings in argument l and m simultaneously.
Example: intersect([

1, 2, 3, 4, 5

"blue", "red", "green", "black"], [

9, 7, 5, 3, 1

"red", "green", "yellow"]) returns [

1, 3, 5]

"red", "green"].
Example: union(fieldValue(%{...fixVersions}, subtasks()), fieldValue(%{...fixVersions}, linkedIssues())) returns the list of Fix Version/s common to sub-tasks and linked issues.

distinct(
number
string list l) 

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with all

numbers

strings in list l without any duplication.
Example: distinct([

1, 2, 1, 3, 4, 4, 5

"blue", "green", "yellow", "blue", "yellow"]) returns [

1, 2, 3, 4, 5

"blue", "green", "yellow"].
Example: distinct(fieldValue(%{...

duedate

assignee},

linkedIssues

subtasks(

"is cloned by"

))) returns

a

the list of

dates containing due dates of cloning issues

assignees to sub-tasks, with only one occurrence per

due date

user, although a user may have more than one

issue may share the same due date

sub-task assigned.

count(
number
string list l)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns the 

Status
colourBlue
titlenumber
of

numeric

string values in l.
Example:count([

1, 1, 2, 2

"blue", "red", "blue", "black"]) returns 4 .
Example:count(

subtasks()) - count

distinct(fieldValue(%{...

duedate

components}, subtasks()))) returns the number of Components selected among all sub-tasks

with field "Due Date" unset

.

count(
number n
string s,
number
string list l)

Status
colour

Blue

Yellow
title

number

String
Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns the 

Status
colourBlue
titlenumber
of times

n

s appears in l.
Example: count(

1

"blue", [

1, 1, 2, 2, 1, 0])

"blue", "blue", "red", "red", "blue", "green"]) returns 3 .

first(string
returns 3 . sum(number list l)

Status
subtletrue
colourBlue
titlenumber []

Returns the sum of 

Status
colourBlue
titlenumber
values in l.
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.

avg(number list l)

Status
subtletrue
colourBlue
titlenumber []

Returns the arithmetic mean of 

Status
colourBlue
titlenumber
values in l.
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.

max(number list l)

Status
subtletrue
colourBlue
titlenumber []

Returns the maximum 

Status
colourBlue
titlenumber
value in l.
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.

min(number list l)

Status
subtletrue
colourBlue
titlenumber []

Returns the minimum nu

Status
colourBlue
titlenumber
 value in l.
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.

first(number
list l)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns the first element in 

Status
colour

Blue

Yellow
title

number of the first element in number

String
list l,

or 

or null if l is an empty list.
Example: first([

3, 2, 1, 0

"blue", "red", "green"]) returns

3

"blue" .

last(
number
string list l)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns 

Returns the first element in 

Status
colour

Blue

Yellow
title

number of the first element in number

String
list l,

or 

or null if l is an empty list.
Example: last([

3, 2, 1, 0

"blue", "red", "green"]) returns

0

"green" .

nthElement(
number
string list l, number n)
: number

Status
subtletrue
colour

Blue

Yellow
title

number

String []
Status
colourBlue
titlenumber

Returns element at position n in 

Status
colour

Blue

Yellow
title

number element at position n in number

String
list l, where n >= 1 and n <= count(l). Returns null if n is greater than the number of elements in l.
Example: nthElement([

5, 6, 7, 8], 3) returns 7

"blue", "red", "green"], 2) returns "red" .

getMatchingValue(string key, string list key_list,
number
string list value_list)
 
0 StatussubtletruecolourBluetitlenumber []

Status
colourYellow
title

string

String
Status
subtletrue
colourYellow
title

string

String []

Returns 

Status
colour

Blue

Yellow
title

number

String

 in

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 count(key_list) + 1 .
Example: getMatchingValue("

Three

Spain", ["

One

USA", "

Two

UK", "

Three

France", "

Four

Spain", "

Five

Germany"], [

1, 1+1, 3*1, 4, 4+1]) returns 3

"Washington", "London", "Paris", "Madrid", "Berlin"]) returns "Madrid" .

getMatchingValue(string key, string list key_list,
number
string list value_list)

Status

subtletrue

colour

Blue

Yellow
title

number []

String
Status
subtletrue
colourYellow
title

string

String []

Returns 

Status
colour

Blue

Yellow
title

number

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 count(key_list) + 1.
Example: getMatchingValue(

5

8, [

1

2,

3

4,

5

6,

7

8,

9

10], [

1, 1+1, 3*1, 4, 4+1]) returns 3

"Washington", "London", "Paris", "Madrid", "Berlin"]) returns "Madrid" .

sublist(
number
string list l, number indexFrom, number indexTo)

Status
subtletrue
colourYellow
titleString []
Status
colourBlue
titlenumber

[]

Returns a 

Status
subtletrue
colour

Blue

Yellow
title

number

String []

 with

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.
Example: sublist([

1, 2, 3, 4, 5

"red", "green", "blue", "purple", "white"], 2, 4)returns[

2, 3, 4

"green", "blue", "purple"].

indexOf(
number
string element,
number
string list l)
: number

Status
colour

Blue

Yellow
title

number

String
Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns the

index of 

index 

Status
colourBlue
titlenumber

value

of string element in

number

string list l. Zero is returned when element is not found in l.
Example:indexOf(

1

"blue", [

5, 2, 1, 4, 1

"red", "blue", "green"]) returns

3

2 .

sort(
number
string list l, order)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns

a

Status
subtletrue
colour

Blue

Yellow
title

number

String []
with elements in l

sorted in specified order

lexicographically ordered. Available orders are ASC (for ascending order) and DESC (for descending order).
Example: sort([

2, 4, 3, 1

"red", "blue", "green"], ASC) returns [

1, 2, 3, 4

"blue", "green", "red"].

textOnNumberList
textOnStringList(
number
string list
numbers
strings, string text_expression)

Status
subtletrue
colour

Blue

Yellow
title

number

String []

StatuscolourYellow

titlestring

Returns a 

Status
subtletrue
colourYellow
title

string

String []
resulting of evaluating text_expression against each of the

numeric values

strings in argument

numbers

strings. Argument text_expression is an expression that returns a string, where

^

^% represents each

numeric value

string in argument

numbers

strings.
Example:

textOnNumberList

textOnStringList([

1, 2, 3, 4, 5], substring("smile", 0, ^)) returns string list ["s", "sm", "smi", "smil", "smile"] .

"albert", "riCHard", "MARY"], capitalizeWordsFully(^%)) returns ["Albert", "Richard", "Mary"] .

mathOnStringList(string list strings
mathOnNumberList(number list numbers
, number math_time_expression) 

Status
subtletrue
colour

Blue

Yellow
title

number

String []

Returns

a

Status
subtletrue
colourBlue
titlenumber []
 resulting of evaluating math_time_expression against each of the

numeric values

issues in argument

numbers

issues. Argument math_time_expression is a math/time expression, where

^

^% represents each

numeric value

string in argument

numbers

strings.
Example:

mathOnNumberList

mathOnStringList([

1, 2, 3, 4, 5], ^ * 2) returns number list [2, 4, 6, 8, 10

"a", "ab", "abc", "abcd", "abcde"], length(^%)) returns [1, 2, 3, 4, 5] .




Div
styleline-height: 150%;
idtocContainer
classtocContainer


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel3
minLevel2
indent20px
classp