Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to summarize aggregateExpression field values for several conditions

Mikhail
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2019

Hi guys,

I want to calculate story points number separately for Devs, SQAs and DevOps by JQL in quick filter. So, there are customfield_1 for total ticket estimation (dev+sqa or devops+sqa) and customfield_2 for SQA estimation only. Devops tickets are marked by DevOps label

Expression for Devs and SQAs works good:

[CSU1-1317] Change DCAT report screens - Align JIR.png

sprint in openSprints() AND labels not in (DevOps) AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_()-customfield_2.sum()") OR sprint in openSprints() AND labels is empty AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_1.sum()-customfield_2.sum()")

 

However if I try to sum up story points for DevOps additionally , ScriptRunner will summarize all tickets in sprint despite the label value and won't show Dev value, because it's missed in last condition

[CSU1-1320] Promote the new deploy project (u1-tpu (2).png

sprint in openSprints() AND labels not in (DevOps) AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_()-customfield_2.sum()") OR sprint in openSprints() AND labels is empty AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_1.sum()-customfield_2.sum()") OR sprint in openSprints() AND labels in (DevOps) AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DevOps, "customfield_1.sum()-customfield_2.sum()")

 

Also I tried to add DevOps field to previous conditions with zero value but nothing changed

[CSU1-1320] Promote the new deploy project (u1-tpu.png

sprint in openSprints() AND labels not in (DevOps) AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_()-customfield_2.sum()", DevOps, "customfield_1.sum()-customfield_1.sum()"OR sprint in openSprints() AND labels is empty AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_1.sum()-customfield_2.sum()", DevOps, "customfield_1.sum()-customfield_1.sum()"OR sprint in openSprints() AND labels in (DevOps) AND issueFunction in aggregateExpression("Total Story Points", "customfield_1.sum()", QA, "customfield_2.sum()", DEV, "customfield_1.sum()-customfield_1.sum()"), DevOps, "customfield_1.sum()-customfield_2.sum()")

 

Do you know some hints for this Use Case? Thank you!

1 answer

0 votes
Cristiano Mariano
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 1, 2020

Hi! How are you doing?

It looks like you would have to add a few parenthesis in your clause.

You would open a parenthesis in the beginning and then close it before the OR you highlighted. Then add another parenthesis after this OR and close it before the next one.

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events