how to hide or show a field without using any code?

I am using JIRA 5.2 version. Now I would like to show/hide a test filed based on the Selected value in the above list.

Is there any way/ setting that enables this functionality? I want to avoid to add JavaScript code for this.

 

Thanks

5 answers

1 accepted

0 vote
Joe Pitt Community Champion Jan 12, 2015

Not unless there is a plugin in the marketplace. JIRA doesn't offer that feature.

1 vote

Use the quisapps "field security" addon, or the script-runner/behaviour plugin (although that's not quite what it is intended for, and you will need some coding).

Plugin Dynamic Forms show/hide fields depends on value in select field (dynamic select customfield). It is very easy to use. I think this is exactly what you are looking for. There is a version 1.3 for JIRA 5.2.

Documantation: http://plugins.intenso.pl/display/PLUG/Dynamic%20Forms

 

I am adding below code in the Description of the Custom Field. If I put alerts, I could see them when the change is being saved but when I open a New Creat Issue screen, it neither show alerts nor the functionality is working nor I could see the JavaScript code added into the view source code. Please advice: (I am using version 5.2.1) <script> AJS.$(document).ready(function(){ AJS.$("select[name=customfield_15366]").change(function () { var length = document.getElementsByName("customfield_15366")[0].options.length; var optionObjs = document.getElementsByName("customfield_15366")[0].options; var flag = 0; for(i=0;i <length;i++){ if(optionObjs[i].selected && ((optionObjs[i].text == "Other"))){ flag = 1; } } if (flag == 1) { document.getElementById("customfield_15552").style.display = "block"; } else { document.getElementById("customfield_15552").style.display = "none"; document.getElementsByName("customfield_15552")[0].value = ""; } }); });</script>

Could you please suggest any plug-in for JIRA 5.2 version?

 

I am adding below code in the Description of the Custom Field. If I put alerts, I could see them when the change is being saved but when I open a New Creat Issue screen, it neither show alerts nor the functionality is working nor I could see the JavaScript code added into the view source code.
Please advice: (I am using version 5.2.1)
<script> AJS.$(document).ready(function(){     AJS.$("select[name=customfield_15366]").change(function () {     var length   =  document.getElementsByName("customfield_15366")[0].options.length;    var optionObjs   =   document.getElementsByName("customfield_15366")[0].options;     var flag = 0;    for(i=0;i <length;i++){        if(optionObjs[i].selected && ((optionObjs[i].text == "Other"))){        flag = 1;       }        }     if (flag == 1)        {           document.getElementById("customfield_15552").style.display = "block";        }        else        {           document.getElementById("customfield_15552").style.display = "none";           document.getElementsByName("customfield_15552")[0].value = "";        }     });   });</script>

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 7 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

25 views 0 4
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