Possibility to chose between two reporters

Originally asked by Bordencea Camelia on 18 May 2023 (original question)


Currently we have a connector for Jira and AzureDevops, where Azure sends the user with email address: def defaultUser = nodeHelper.getUserByEmail(“default@idalko.com”)

Would it be possible to make it choose between the default and another user that we are choosing, eg:

def defaultUser = nodeHelper.getUserByEmail(“default@idalko.com” || “user.username@domain.com“)

Or, would it be possible to use a placeholder depending on the user that is available on the ticket?


[Failed to download attachment: attachment_58502083_mail_small.gif. Error: 401 Client Error: for url: Service Management]

[Failed to download attachment: attachment_58502083_mail_small.gif. Error: 401 Client Error: for url: Service Management]

Answer by Syed Majid Hassan on 20 May 2023

Hi Bordencea Camelia,

Can you please explain what you are trying to achieve here? Is it this:

if the user being sent by Azure is present in Jira, then you assign the ticket to that user,

otherwise, you assign to the defaultUser?

If this is it, then the standard code provided in the script window should work already.

Thanks

Majid