Originally asked by Shadi El Sangedy on 08 April 2020 (original question)
In the external JIRA issue there is a component named “Backend”, in the internal Jira this component should be automatically changed to “API”, I tried to use the following
issue.components = replica.components
.collect { remoteComponent ->
nodeHelper.getComponent(
if(remoteComponent.name == "Backend"){
remoteComponent.name
} else remoteComponent.name,
nodeHelper.getProject(issue.projectKey)
)
}.findAll()
But it says I cannot call if in that context