I was able to get this to work. Here is my code:
def component = nodeHelper.getProject(issue.project?.key ?: issue.projectKey).components.find {c-> c.name == replica.Module?.value}
issue.components += component
I was able to get this to work. Here is my code:
def component = nodeHelper.getProject(issue.project?.key ?: issue.projectKey).components.find {c-> c.name == replica.Module?.value}
issue.components += component