Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Can I hide/show a field based on another field's value without using the Behaviours Plugin?

Jeannette Lamb
Contributor
April 29, 2014

I have JIRA 6.0.8 and have tried putting the following script in my custom field (free text unlimited) called "Test Script". I only want the field to display when the custom radio button field "Auto/Manual" is set to "Manual".

I entered the script in the description (Custom Fields / Edit / Description)

10900 is the Auto/Manual field, 11300 is the Test Script field

I am using Chrome. Haven't tried any other browsers.

<script type="text/javascript">

AJS.$(document).bind('dialogContentReady', function(event, dialog) {

field = document.getElementById('customfield_10900');

if (field) {

target = document.getElementById('customfield_11300').parentNode;

// Hide the Test Script field if Auto/Manual doesn't equal Manual

if (field.value != 'Manual')target.style.display='none';

field.onchange=function() {

if (this.value == 'Manual') {

target.style.display = ";

target.value="Specify the name (or ID) of the test script where the sub-test is to be manually tested.";

} else {

target.style.display='none';

}

}

});

</script>

1 answer

0 votes
Sunny Goyal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2014

I have the similar issue. I cannot use Bheaviours plugin as it is not supported in JIRA 6.2.3.

Can someone help??

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events