Assignee is not assigned from JCloud to JiraOnPrem

Originally asked by Harold Oconitrillo on 31 August 2023 (original question)


I checked the community and found not an answer to my question.
My code is the following:

def defaultUser = nodeHelper.getUserByFullName(replica.assignee.displayName)
issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser

I am syncing the user between two Jira instances.
Due to the fact, that in the source Jira system the assignee is “unassigned” the user is not in the replica, and I am running into an error.

Could you please help me out here?


Answer by Francis Martens (Exalate) on 31 August 2023

Hi Harold Oconitrillo

Why are you setting the default user to the replica?
I would expect something like

def defaultUser = nodeHelper.getUserByFullName("Harold")
issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser

Check the difference how the default user is set - line 1