You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.