Script Runner aggregate function not working

Whenever i fire the below query, i get the below error in JIRA.Could you pease assist. 

 

project = "XXX " AND type = Story AND Sprint in (2276, 2244, 2152, 2162, 2200, 2435, 2255, 2318, 2222, 2233) AND  issueFunction in aggregateExpression("Story Points" ,"QAStoryPoints.sum()

image2016-12-7 17:45:15.png

But when i give the below query, its working. Both Story Points and QA Story points are Field Custom Fields

image2016-12-7 17:45:47.png

 

5 answers

1 accepted

I noticed that there's a colon in your field name. Perhaps that is the issue? ScriptRunner simply isn't finding your field because you're not asking for it by its name. 

They're both custom fields, but custom fields have types. What type of field is QA Story points?

If QA Story Points is a scripted field, then ScriptRunner will try to infer its type based on the searcher. JIRA Software's Story Points field is a Number field. What type is QASP?

Screen Shot 2016-12-07 at 2.35.16 PM.png

 Hi,

QA Story Points custom field is also a Number field.Attaching a screen shot.

 

image2016-12-7 20:18:41.png

 

image2016-12-7 20:20:18.png

i did try putting a colon at the end of the field name, but its not helping.Below is the error.Should i edit the Field name and remove the colon for this issue to get resolved?

 

image2016-12-7 21:40:58.png

Corrected the Field name by removing the colon and it works now.Thanks.

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
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

128 views 0 3
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