Hi,
Jira version: v9.5.0
Using scriptrunner
I have a issue type "Feature"
I have created a issuePicker custom field called "Feature link", that I want to hide when "Epic Link" is present in Story. The motivation here is that a story can either be connected to Epic or to Feature and not both.
In the issue edit mode, when I enter the epic link, the "parent link" drop-down option of "parent link" disappears instantly however field name and help text is remaining. In case of custom field "feature link", the drop down menu is still visible.

The behavior script on Field "Feature Link" that I am using
import com.atlassian.jira.issue.IssueFieldConstants
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def epicField = getFieldByName("Epic Link")
def featureField = getFieldByName("Feature Link")
if (epicField.value) {
featureField.setReadOnly(true)
featureField.setHelpText("Cannot use Feature Link when Epic link is set.")
}
else if (!epicField.value) {
featureField.setReadOnly(false)
featureField.setHelpText("")
}
Any suggestions about that how to make the "Feature Link" drop-down to dis-appear.
Another question in continuation to it:-
Once "Feature Link" custom field has Jira number and later I put the Epic Link, eventhough the "Feature Link" field is readonly but has Jira number. Is there any way to reset the field value to placeholder text "Select Feature"
Br.
Alok