Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to hide or display a custom field based on issue type selected.

Benny Argo September 21, 2018

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);
}

1 answer

0 votes
Benny Argo September 21, 2018

Resolved myself

krishnakanth_av August 9, 2019

What is the solution you had implemented to resolve the issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events