Hello,
In my jira instance we had a custom field called "Super Power" (user picker type)this field already set to default value 'SIVA' by using custom field configure. But here the issue is when issue is moved to project A to project B the custom field also reflects the same value 'SIVA' but i need a different value 'RAJA' in project B.
I wrote a script using scriptrunner behaviour
import com.atlassian.jira.component.ComponentAccessor
def FieldName = getFieldByName("<Super Power>")
def optionsManager = ComponentAccessor.getOptionsManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObject(FieldName.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)
def optionToSelect = options.find { it.value == "<RAJA>" }
FieldName.setFormValue(optionToSelect.optionId)
And finally mapped the issuetype and project B to behaviour. But the above script not working can any one please help me how to solve this issue.
Thanks,
Siva.