Sum scripted field

Royce Wong
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.
May 13, 2016

Hi,

Anyone know if it's possible to sum a scripted field (provided by Script Runner, defined as number)?

I tried...

 

... and issueFunction in aggregateExpression("My Total","MyScriptedFieldName.sum()")

didn't seem to work.

Thanks in advance.

1 answer

1 accepted

1 vote
Answer accepted
JamieA
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.
May 15, 2016

It does not at the moment, I have created https://productsupport.adaptavist.com/browse/SRJIRA-1909, although there are other ones that are similar.

Please vote/watch it, so you get a notification when it's done.

Royce Wong
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.
May 16, 2016

Thanks @Jamie Echlin (Adaptavist). I would vote and watch, but I signed up and got the following message when I tried to view: https://productsupport.adaptavist.com/browse/SRJIRA-190. Don't know if you can fix that. Thanks.

This issue can't be viewed

The issue you're trying to view can't be displayed.
It may have been deleted or you don't have permission to view it right now.

 

Royce Wong
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.
May 16, 2016

@Jamie Echlin [Adaptavist]

I am thinking of a workaround... is it possible to update a 'regular' custom field inside a scripted field? That way, I can use the  aggregateExpression with the 'regular' custom field.

If that's possible, is there any code snippet you can direct me to?

Thanks again.

Royce Wong
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.
May 16, 2016

@Jamie Echlin [Adaptavist]

I answered my own question, yes, it's possible to update another custom field from a scripted field (at least my code seems to work). Thanks again.

 

 

 

Suggest an answer

Log in or Sign up to answer