Hello,
I develop a script groovy, I would like know how I retreive the value of custom field present in the issue?
Guis
For example:
I want to CF 'TestCustomFieldA', make a script that sum +1 to value of another CF called 'TestCustomFieldB'. You have to make this script and apply in TestCustomFieldA:
def test = getCustomFieldValue("TestCustomFieldB")
if (test) {
float number = TestCustomFieldB.getValue()
number = number + 1
return number
}
else{
return null
}
You probably mean script in context of script runner plugin, so
def cfX = ComponentAccessor.customFieldManager.getCustomFieldByObject("X") def value = issue.getCustomFieldValue(cfX)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.