This function returns the result of a given Jira expression.

jiraExpression(text) #Output: Text 
Parser expressionDescription
%{sort(distinct(toStringList(jiraExpression("issue.subtasks.map(s=>s.components.map(c=>c.name))"))),ASC)}

This example returns an ordered list of the unique component names of all sub-tasks of an issue, e.g.

Backend, Frotend, UI

%{Hi [~accountid:%{issue.project.lead}],
the user %{system.currentUser.displayName} has written 
%{jiraExpression("issue.comments.filter(c=>c.author.accountId==user.accountId).length")} comments to this issue and created %{jiraExpression("issue.subtasks.filter(s=>s.reporter.accountId==user.accountId).length")} sub-tasks.}

This example returns:

Hi [~accountid:557058:145e0473-5707-439c-80e4-1160dd57f114],

the user John Doe has written 3 comments to this issue and created 2 sub-tasks.



Parameters used in this function

ParameterInput (data type)Description
text

Any given text which can be evaluated as Jira expression.


(warning) The text is not checked for syntactical correctness when defining it in the parser expression editor.

This function returns a  

Variant where you can additionally define a list of issues which can be used within the Jira expression given as the first parameter. You can access these issues using issues as context.

jiraExpression(text, issueList) #Output: Text list
Parser expressionDescription
%{sort(
     distinct(
            jiraExpression("issues.map(i=>i.subtasks).flatten().map(s=>s.components.map(c=>c.name)).flatten()",
            linkedIssues())),
  ASC)}

This example returns an ordered list of the unique component names of all sub-tasks of the linked issues, e.g.

Backend, Frotend, UI

To achieve this the following function is used:

You have to use flatten because sub-tasks of a list of issues are returned as a multi list in a Jira expression.


Parameters used in this function

ParameterInput (data type)Description
text

Any given text which can be evaluated as Jira expression.


(warning) The text is not checked for syntactical correctness when defining it in the parser expression editor.

issueList

           

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

This function returns a  

Variant where you can additionally define a string of Issue keys which can be used within the Jira expression given as the first parameter. You can access these issues using issues as context.

jiraExpression(text, issueKeys) #Output: Text list
Parser expressionDescription
%{sort(
     distinct(
            jiraExpression("issues.map(i=>i.subtasks).flatten().map(s=>s.components.map(c=>c.name)).flatten()",
            "PU-2, PU-7, PU-120")),
  ASC)}

This example returns an ordered list of the unique component names of all sub-tasks of the linked issues, e.g.

Backend, Frotend, UI

You have to use flatten because sub-tasks of a list of issues are returned as a multi list in a Jira expression.


Parameters used in this function

ParameterInput (data type)Description
text

Any given text which can be evaluated as Jira expression.


(warning) The text is not checked for syntactical correctness when defining it in the parser expression editor.

issueKeys

           

A text with a comma-separated list of issue keys.

This function returns a  

Short description

Returns the result of a Jira expression.

Output