Forums

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

ScriptRunner Behaviour and Hidden Custom Field

merve.oezkara
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2020

Hi,
in my Resolve Screen on a Transition I want to have a Custom Field (Fixed in Release) only shown when Resolution=Done and only for one project - until here that works fine:

import com.atlassian.jira.issue.resolution.Resolution

def ResolutionField = getFieldById("resolution")
def FixedInRelField = getFieldByName("Fixed in Release")

def Resolution = ResolutionField.getValue() as Resolution

if(Resolution.name == "Done") {
FixedInRelField.setRequired(true)
FixedInRelField.setHidden(false)

} else {
FixedInRelField.setRequired(false)
FixedInRelField.setHidden(true)
}

But I want to have this field hidden for all other projects.
So when I hide Fixed in Release in the Field Configuration Scheme the ScriptRunner Behaviour doesn't work anymore - Fixed in Release is never shown even if Resolution=Done.

How can I achieve that Fixed in Release is always hidden and only shown in one project when Resolution=Done ? And therefor I want to use only one Workflow.

0 answers

Suggest an answer

Log in or Sign up to answer