Versions Compared

Key

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


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 index / position of a specified element in a number list.


Code Block
languagebash
titleSyntax
linenumberstrue
indexOf(number, numberList) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
indexOf(1, [5, 2, 1, 4, 1])


This example returns

3


Code Block
languagebash
linenumberstrue
indexOf(3, [5, 2, 1, 4, 1])


This example returns the 0, since 3 is not in the provided list.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
number

Status
subtletrue
titlenumber

Any given number.
numberList

Status
subtletrue
titlenumber list

Any given number list.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
.

If the number is not part of the number list, the function returns 0.



Text list

UI Text Box
sizemedium
typeinfo

Variant for text lists.


Code Block
languagebash
titleSyntax
linenumberstrue
indexOf(text, textList) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
indexOf("blue", ["red", "blue", "green"])


This example returns

2


Code Block
languagebash
linenumberstrue
indexOf("orange", ["red", "blue", "green"])


This example returns the 0, since "orange" is not part of the list.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any given text.
textList

Status
subtletrue
titletext list

Any given text list.



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber
.

If the text is not part of the text list, the function returns 0.



Issue list

UI Text Box
sizemedium
typeinfo

Variant for issue lists.


Code Block
languagebash
titleSyntax
linenumberstrue
indexOf(issueKey, issueList) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
indexOf(%{issue.key}, issuesUnderEpic())


This example returns the index of the current issue in relationship to all issues under the current epic.

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
issueKey

Status
subtletrue
titletext

Any given issue key.
issueList

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
.

If the issue key is not in the issue list, the function returns 0.




UI Text Box
sizemedium
typeinfo

Variant where you define an issue list instead of an issue key.


Code Block
languagebash
titleSyntax
linenumberstrue
indexOf(issueList1, issueList2) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
indexOf(linkedIssues(), subtasks())


This example returns the index of the first linked issue which is also a subtask.

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
issueList1

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).

The index will always be retrieved from the first element of the list. If the list returns [ISSUE1, ISSUE2], the index of ISSUE1 will be retrieved.

issueList2

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
.

If the first issue list is empty or the second list does not contain the issue, the function returns 0.



Image AddedUse cases and examples

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


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 the index / position of a specific element in a list.

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourBlue
title2.1.29

Label