Hi,
I would have a required field (RespoTRA) when other field (DetectEnviro) have specific value : "Production"
I use this script with script runner (in behavior).
import com.atlassian.jira.component.ComponentAccessor
def DetectEnviro = getFieldById("customfield_10232")
def RespoTRA = getFieldById("customfield_10248")
if (DetectEnviro.getValue() == "Production") {
RespoTRA.setRequired(true)
}
else {
RespoTRA.setRequired(false)
}
That works but not all time.
When I open eddit screen, if the value is Production, I can validate even if RespoTRA is empty. The second time it's work.
And if I change the value of DetectEnviro (with other than Production), RespoTRA stay required while it should not. If I look in list of RespoTRA the required disappears.
I didn't manage to use initializer...
Can someone help me ?