I have to create a script runner custom field

Manikandan K November 3, 2017

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 votes
Answer accepted
Jenna Davis
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.
November 6, 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

Manikandan K November 6, 2017

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

Jenna Davis
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.
November 10, 2017

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