Hi
I want to check my user organization and if it was in an organization , show some value of a custom field. and if it was in another organization it can show another value to it.
i write this script in Initialiser in Behaviour Settings.
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
FormField cForm = getFieldByName("Organizations")
FormField OrgForm = getFieldByName("Customer")
def orgValue = cForm.getValue()
def Mito = getFieldById("customfield_1111")
if(orgValue!=null){
OrgForm.setFormValue(orgValue)
}
if (OrgForm.getValue() == "1")
{
OrgForm.setFormValue("Mito");
Mito.setHidden(false);
}
else
{
OrgForm.setFormValue("None");
}
but at first when the form loading, it show all items and after 1 second it will be hidden.
any ideas what is wrong here?
Thanks