Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Assignee is not assigned from JCloud to JiraOnPrem

 
1
0
-1

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?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      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 

        CommentAdd your comment...