I am attempting to use script runner to hide or display custom field based on what the user selects from the issuetype field when creating a task.
In the Behaviors area I have create a behavior for "layout"
in the layout behavior I have set a script to hide or display a custom field based on what a user selects from the issue type drop down, but some where the condition is not being process or run.
Here is my setup:
Fields: Issue Type
Condition to be ran when FM1 Draft:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.*
def issuetype = getIssueContext().getIssueType().name
def conditionA = getFieldById("customfield_11100")
if (issuetype == "FM1 Draft") {
conditionA.setHidden(false);
} else {
conditionA.setHidden(true);
}
What is the solution you had implemented to resolve the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.