Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to calculate value from other fields through script runner plugin.

Subhash Haritwal August 1, 2018


i have two different custom fields for ex. 1) - Business Value 2) - Technical Value

i want to get sum value of above both fields into "Overall Value" field.

i created Scripted Field which name is "Overall Value".

which script i have to put in Description and how to add post function?

Please help me, i am new on this and it's priority task for me .





1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Mark Markov
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.
August 1, 2018

Hello @Subhash Haritwal

Place this script in your scripted field

import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def businessValue = issue.getCustomFieldValue(customFieldManager.getCustomFieldObjectByName("Business Value"))
def technicalValue = issue.getCustomFieldValue(customFieldManager.getCustomFieldObjectByName("Technical Value"))

return businessValue + technicalValue

For what purposes do you need postfunction here?

AUG Leaders

Atlassian Community Events