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

0 vote
Jenna Davis Community Champion Nov 06, 2017

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

228 views 4 9
Read article

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