The Exalate team will be on holiday for the coming days - returning Jan 4 Enjoy & stay safe
Context:
Problem:
Solutions:
Without JIRA API imports:
/* firtssyncs and other fields syncs */ // CF "AssigneeJIRASW" to target "Assignee" field String AssigneeJIRASW = replica.customFields."AssigneeJIRASW".value?.getAsString() def defaultUser = nodeHelper.getUserByEmail("default.user@idalko.com") if (AssigneeJIRASW) { issue.assignee = nodeHelper.getUserByEmail(AssigneeJIRASW) } else { issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser } issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
With JIRA API imports:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.sal.api.component.ComponentLocator import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.CustomFieldManager /* firtssyncs and other fields syncs */ // CF "AssigneeJIRASW" to target "Assignee" field def issueSR = ComponentLocator.getComponent(IssueManager).getIssueObject(replica.key) def cField = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("AssigneeJIRASW") def cFieldValue = issueSR.getCustomFieldValue(cField) def defaultUser = nodeHelper.getUserByEmail("default.user@idalko.com") if(cFieldValue) { issue.assignee = nodeHelper.getUserByEmail(cFieldValue) } else { issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser } issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
Single choice Database Picker cf "AssigneeJIRASW" custom field configuration:
Context:
Problem:
Solutions:
Without JIRA API imports:
With JIRA API imports: