Java script not working

I have two custom fields.One select field .I need one description field to be filled if answe is No

<script type="text/javascript">

FeatureToggle = document.getElementById('12000');

if (FeatureToggle) {

target = document.getElementById('12100');

if (FeatureToggle =='Yes')'none';

FeatureToggle.onchange=function() {

if (this.value =='No') { = '';

target.value="Why feature toggle is No";

} else {'none';





2 answers

0 votes

And your question is ... ?

  1. Please put your code in a code block to improve visibility
  2. What else have you tried?
    1. Already debugged your Javascript code? How should this work? For instance FeatureToggle is an element, how should this be "Yes"?
  3. Put your code in
    jQuery(function(jQuery){ // Your code here});
    to be sure, it is loaded after all elements are rendered.
  4. Use jQuery to add event listeners, find and alter elements, to be sure you are cross browser compatible

is this script correct.Its not working after adding it.Also i added in here custom fields---)right click ---)configure ---)description.

please advise.Als advise if there is anyother script for the requirement


Thanks for looking.

I have a select list with yes or No that is FeatureToggle .My requirement is if user selects no he should give expalanation.So i created another field which is a text field.I need this mandatory/fill if he selects no.

Kindly help

Have you tried Adrien's suggestions yet? Repeating the question is of no help, you need to think through the responses you get and respond to them with more information.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,084 views 4 9
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