Originally asked by Chama on 09 January 2023 (original question)
Hi,
I have ADO bugs sync with Jira defects. I need to search the ADO summary (description) and search for a specific word to switch the Jira assignee accordingly. However, I cannot get it to work. Please see the sample below.
def AssigneeSVT = nodeHelper.getUserByEmail(“email1@abc.com”)
def AssigneeSIT = nodeHelper.getUserByEmail(“email2@abc.com”)
def InSummary = replica.summary
if (InSummary.contains(“SVT”)) {
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: AssigneeSVT
}
if (InSummary.contains(“SIT”)) {
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: AssigneeSIT
}
Above code doesnt work.
Please help.