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

Ecom jira May 20, 2014

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

3 answers

1 accepted

1 vote
Answer accepted
Anna Cardino
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
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

3 votes
Andrian F September 24, 2015

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

 

Kenneth P November 10, 2015

This is a great workaround! Thanks so much.

Aisha M March 29, 2018

@Andrian F 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.

Mao Lee February 26, 2019

Same here, it didn't work for me

0 votes
Michael Bernhard March 3, 2016

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

Andrian F March 7, 2016

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