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
This is because Behaviours have to be done last when doing the page rendering. Jira pages can be very heavy on the javascript and it can take a while for it to all load and execute, and as the Behaviour is last, you're seeing it execute at the end.
thanks for your response.
Do you have a solution for this?
I want to be displayed some values from the checkbox field if the customer was a member of a specific organization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only fixes for this are to simplify and hence shorten the javascript needed (that's an Atlassian task, as the coders of the software) or to get a faster browser (which is unlikely to happen unless you're using a microsoft one)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.