Questions for Confluence license has expired.

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

user's email & name from ZD reporter to JSD reporter

 
2
1
0

Hi,
i would like to set 2 fields between jsd and ZD.

1. ZD reporter email, to JSD reporter.
2. ZD reporter user name, to JSD custom field.

can you please advise on outgoing / incoming for each?



and a follow up question - 

i would like to block any incoming on the JSD, if the reporter's email is not exam@ple.com

should i add  at the beginning of the incoming script

if (replica.reporter.email != exam@ple.com) {return}



    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      You can do that with:

      //Outgoing ZD
      replica.reporter = issue.reporter
      //Incoming JSD
      issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email)
      issue.customFields."Custom Field Name".value = replica.reporter.username

      Regarding your follow up question, your code looks fine, I would try that.

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Juan Grases  a follow up question - if the email of the incoming reporter doesnt exist in jira, how would i revise this statement

        issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email)
        to have a default of the EXALATE user?
          CommentAdd your comment...