I have to create a script runner custom field

I have to create a script runner custom field and populate the value from the from below query 

Please let me know how to achieve this

issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()",
"Remaining work", "remainingEstimate.sum()") and Sprint in openSprints()

1 answer

1 accepted

Hello, 

Can you please clarify exactly what you're wanting to do? What type of field are you wanting to populate and how?

There's a bit more information on the aggregateExpression function here, and more information on script fields here. One of those pages might help you out. 

Jenna

Hello Jenna,

I have to create custom field to populate the result of below query 

project=AAAA and issueFunction in aggregateExpression("remainingEstimate.sum()") and Sprint in openSprints()

 

Let me know the steps.Thanks

Unfortunately, aggregateExpression won't work in the way you're looking for. You'll have to run the JQL search in your scripted field, then do the math on your query result in your code. 

You also need to be aware of the limitations that come with running jql searches in scripted fields.  

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,739 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot