How to sync a SF field into a Jira Cloud 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
1 Like