Hi,
I want to write a script runner behaviour script based on the Profield value. Can someone please tell me how to get the field value. Based on the value, i will set another field to Hidden.
thanks in advance!!
I have tried as i do for normal custom field. But It didn't work out. Please find my code below,
import com.atlassian.jira.project.Project
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
//Defining Audience custom field object
def customFieldManager = ComponentAccessor.getCustomFieldManager();
def audienceField = customFieldManager.getCustomFieldObject("customfield_16603");
Project project = getIssueContext().getProjectObject()
String projectCategory = project.getProjectCategory().getName() as String
String projectKey = project.getKey()
def feature_link_field = getFieldById('customfield_15727') // Defining an object for Feature Link issue
if(underlyingIssue.getCustomFieldValue(audienceField).toString() == 'Development') {
feature_link_field.setHidden(false);
}