Quantcast
Channel: Active questions tagged atlassian-plugin-sdk - Stack Overflow
Viewing all articles
Browse latest Browse all 280

How to retrieve the value of the summary system field using the postfunction of a workflow transition in scriptrunner

$
0
0

I am trying to retrieve the value of the Summary system field in Jira using ScriptRunner. I am using the following code in scriptrunner but the problem is that the variable cf returned by the line def cf = customFieldManager.getCustomFieldObject("Summary") is null. How can I fix this and retrieve the value of the summary field in ScriptRunner?

import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport org.apache.log4j.Loggerdef log = Logger.getLogger("atlassian-jira.log")def customFieldManager = ComponentAccessor.getCustomFieldManager()def issueManager = ComponentAccessor.getIssueManager()def cf = customFieldManager.getCustomFieldObject("Summary")log.warn("MOUNA 1: "+cf)issue.setCustomFieldValue(cf, "mouna")log.warn("MOUNA 2: "+issue)

Viewing all articles
Browse latest Browse all 280

Trending Articles