Is there a way to remove "None" from the drop down fields ,Cascading select and default to empty.

a way to remove "None" from the drop down fields ,Cascading select and default to empty.

3 answers

1 accepted

1 vote
Anna Cardino Atlassian Team May 21, 2014

Hello,

Unfortunately JIRA doesn't remove 'None' from a Cascading Select Custom Field when they are two values present. I came across have an improvement request to better handle this as tracked under JRA-32463. I would suggest that you do the following on the ticket:

* Vote, so that it will receive more attention

* Watch it, so that you will receive any and all updates

* Comment, and give your opinion on the matter

You could look at customising JIRA to prevent this kind of behaviour,

Hope it helps.

Regards,

Monique

I added the below JavaScript to the description of the cascading field in the field configurations. Worked for me.

#customfield_33382 = "id of the parent select list"
customfield_33382:1 = name of the child select list"

 

<script>
    AJS.$('#customfield_33382').children(':first').hide();
    AJS.$('#customfield_33382').change( function (e){
       setTimeout(function () {
            AJS.$('[name="customfield_33382:1"] option:first').remove(); 
        }, 100);
 
    });
</script>

 

Thanks

Andrian

 

This is a great workaround! Thanks so much.

@Andrian Fernand3 This works good :) But after I add this to script, I get a NONE in the first drop down , even though I have a default value set for the field.

I implemented this - so far so good. The problem is that as soon as I do a few manipulation on existing tickets (commenting, moving, etc.) and then create a new ticket, the "none" is back.

Checked with Firefox and Chrome, JIRA 6.3

Any idea, why?

Thanks and best,
Michael

Did you check if the JS is getting executed . Try to add some console.log("") messages and verify that.

Recently i came to know that, JS to be executed the user needs to have edit permissions on the ticket.

That could be one reason too

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

213 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