scriptrunner behaviour does not work proprely

Hello, I've done a script in scriptrunner behavior and it works only on the opening screen.

My script is to mandatory a customfied if an another customfield has the "1 - Very high" value...very simple

def infoprio = getFieldById("customfield_11002")
def impact = getFieldById("customfield_12404").getValue()
 
if (impact == '1 - Very Hight'){
    infoprio.setRequired(true)
}
else
    infoprio.setRequired(false)

A the opening of the screen the script is OK but when I try to change the value of the impact fiedl (a list) it does not work, nothing hapens.

Is there somebody have an idea ?

2 answers

0 vote

Possibly typo of "1 - Very hight" ?

I see you asked and resolved the same question on our support portal, perhaps you could share the solution here.

Sure...my problem was that I wasn't on the good field behaviour.

The script is good but I wasn't on the customfield_12404 behaviour, the field I would like to watch.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

1,023 views 3 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you