Hi everyone,
i need to set the reporter on create issue based on a custom field which is read over nfeed. the custom field E-Mail is the username of the user in jira itself.
we have the addon script runner so we can user a groovy script.
can somebody help me please. i tried several scripts here but it does not work.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
MutableIssue issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("")
def newreporter = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("E-Mail")
def newreportervalue = issue.getCustomFieldValue(newreporter)
issue.setReporter(newreportervalue)