Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Delay to load Behaviour Settings

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
 

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 04, 2021

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. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 06, 2021

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)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events