Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Summation of aggregateExpression field values (Adaptivist ScriptRunner)

Edited

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

After updating to Scriptrunner DC 6.40.0 is seems that the Story Points sum has stopped working?

issueFunction in aggregateExpression("Total points", "StoryPoints.sum()")

Thanks! 

Indeed, that's why I came here !

So I just noticed they released a new v6.40.1 :)

https://docs.adaptavist.com/sr4js/6.40.1/release-notes/release-6-x#id-.Release6.xv6.40.1

Like Luis Tellado likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

392 views 2 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you