If i have take drop down field - "type of content" where i have given 4 options as dropdown (please

If i have take drop down field - "type of content" where i have given 4 options as dropdown (please refer to the image attached). In this, i also have an option as 'others'. If i chose others i should get an option to write my own text . How can this be achieved ? Please reply with a solution- 

 

In the below script i have take test field(with drop down with 'others' as an option), if i click on others i should get a test field to fill in my requirement. The below code does not work for me

<script type="text/javascript">
priority = document.getElementById('Test field');
if (Test field) {
target = document.getElementById('customfield_26823');
// Hide the target field if priority isn't critical
if (Test field.value!= others) target.style.display='none';

priority.onchange=function() {
if (this.value == 2) {
target.style.display = '';
target.value="enter your message here";
} else {
target.style.display='none';
}
}
}
</script>

1 answer

0 votes

Hello,

You could use such plugins as Adaptivist ScriptRunner(behaviours) or Power Scripts(Live fields) instead of writing your own JavaScript

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,326 views 21 17
View question

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