Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue


// the values of that custom field - of type number - we want to sum up
final String customFieldName1 = "Number1"
final String customFieldName2 = "Number2"

def customField1 = ComponentAccessor.customFieldManager.getCustomFieldObjects().findByName(customFieldName1)
def customField2 = ComponentAccessor.customFieldManager.getCustomFieldObjects().findByName(customFieldName1)


def num1 = issue.getCustomFieldValue(customField1) as Double;
def num2 = issue.getCustomFieldValue(customField1) as Double;

num1+num2;
  • No labels