Is there a better way to write this Jira query?

27 views Asked by At

what is wrong with this code:

issueFunction in linkedIssuesOf("type = Epic", "is epic of") AND 
component is not EMPTY AND "Epic Link" is not EMPTY AND issueFunction 
in aggregateExpression("Total Stories", "count()", "issuetype = Story") 
AND issueFunction in aggregateExpression("Done Stories", "count()", 
"issuetype = Story AND statusCategory = Done") AND issueFunction in 
aggregateExpression("In Progress Stories", "count()", "issuetype = 
Story AND statusCategory = 'In Progress'") AND issueFunction in 
aggregateExpression("To Do Stories", "count()", "issuetype = Story AND 
statusCategory = 'To Do'") ORDER BY "Epic Link"

I executed the above query but receiving error

1

There are 1 answers

0
Mohamed Yedes On

The function aggregateExpression doesn't work like this. It doesn't take three parameters.

It takes two parameters : issueFunction in aggregateExpression(label, expr)

For example : This query gives you the list of issues in the project "CLITRE". And shows you the number of issues reported by the user "myedes". enter image description here

You can also use multiple parameters to show many information. The query should be like this : issueFunction in aggregateExpression(label1, expr1, label2, expr2, …​)

See reference