Questions for Confluence license has expired.

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

How to change assignee? Jira on premise to Jira Cloud

 
1
0
-1

Hello,


I'm getting sync from Jira on premise site, to Jira Cloud site.

I would like to set assignee on project lead, but only if assignee on the other side is set to a specific user, let's say "USER 1".


Can you please provide help?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      You want to set the issue.assignee to issue.project.lead when the remote assignee is set to "USER 1"?


      Use following snippet


      if (replica.assignee.displayName == "USER 1") {
         issue.assignee = issue.project.lead
      }
      1. Filip Š.

        Hi Francis,


        I'm working on cloud side, and this part 

        issue.assignee = issue.project.lead is not working for me.

        Can you please take a look at this.
      2. Francis Martens (Exalate)

        'is not working for me.' is really not sufficient as a statement.

        Please try to understand what is not working and provide more details. 



      3. Filip Š.

        Ok, thank you for understanding.


        issue.assige = issue.project.lead - this part is not working, it does not set a right person. As a matter of fact, it doesn't set anyone.

        When I use this code instead "issue.assignee = nodeHelper.getUserByEmail("test@test.com")" it is working and it does set me the assignee with this adress.


        Do you understand me now?

        Kr,

        Filip

      4. Francis Martens (Exalate)

        So - did you look if issue.project.lead has a value?

        Use a debug statement to inspect

        something like

        debug.error("project lead = ${issue.project.lead}")



      CommentAdd your comment...