behaviours plugin - Create issue page, custom field value not refersh

Have Projet Called "XX" which has 3 Issue Type, Each issue type having different create Screen.

I have Configured "Environment Drop Down List" Custom Filed In Three issue types.

Environment Field has " Dev, QA, PRod" value.

When I select "PROD" value, I have to Enable " PRoduction Category" Drop down List" Field. If i select other values, Have to hide "Production Category" Value.

I have implemented the same in Three issue types (Three Create issue Screen).

and also created Three diferent behvaiour also.

"ENvironment Custom field Not refreshing, IF i change issue type one to another, the one which i select last time, it would populate, i want to refresh each time .

i want to show environment default value "None" , if i turn any ther issue type.

example :

If i selet "Issue Type 1 ", then "Environment ="PRod", then i swith over, Issue type 2, but issue type 2 showing the"Enironment ="Prod", i wan to show th default value.

Does it make sense?

Environment : Field :

FormField Env = getFieldByName ("Environment")

FormField ProductionCategory = getFieldByName ("Production Category")

String EnvVal = (String) Env.getValue()


if (EnvVal == "PROD")
{
ProductionCategory.setHidden(false)
ProductionCategory.setRequired(true)

}
else {
ProductionCategory.setHidden(true)
ProductionCategory.setRequired(false)

}

4 answers

0 votes

What version? This is fixed in recent versions.

I meant what version of the plugin. But ok so you are using an old version of the plugin. As I say this is fixed in recent versions but requires jira 6. No intention to backport my changes to previous versions.

ok. thanks, can u pls clarify how can i "Refresh Drop down list "Default " value. posted my code below

FormField Env = getFieldByName ("Environment")

//hide value
FormField ProductionCategory = getFieldByName ("Production Category")

//Hide value


String EnvVal = (String) Env.getValue()

String pc = (String) ProductionCategory.getValue()


if (EnvVal == "PROD")
{
ProductionCategory.setHidden(false)
ProductionCategory.setRequired(true)


}
else {

ProductionCategory.setHidden(true)
ProductionCategory.setRequired(false)

}

ok. thanks. I have written Script while choosing "environement Type="Prod" , if i select "Prod", automatically, i have enabled "Prodctuion Category " Dropdown list". if i select "Dropdownlist" value as "ECR", am showig "ECR Details textbox.

if again change, environment type="Dev", I have hiddded "PRoction Category", ECR DEtails text box.

but if i choose again "Environment type="Prod", the procution category dropdwon choosing past value which i choose last time, i wan display Prodcuion category " Non" value.

Actually, Prodcuton category selection not going to Default Null value .

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,009 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot