How to Remove "None" from select list options.

Hi There,

Can you suggest me the way to remove "none" option from select list ?

4 answers

1 accepted

2 votes
Accepted answer

I achieved this by using javascript.

Can you share your javascript?

AJS.$(document).ready(function(){
AJS.$("input[name=customfield_10768]").blur(function () { <!--"customfield_10768" Field that is placed before the Select Box field, who will triggered the codition.-->
var objoptions = document.getElementsByName("customfield_11170")[0].options; <!--"customfield_11170" Select Field-->
if (objoptions[0].text == "None")
{
document.getElementsByName("customfield_11170")[0].remove(0);
}
});
});

Cheers!!!

Where do you put this javascript?

In the description of the custom field.

Thomas Schlegel Community Champion Apr 24, 2012

as it is mentioned in the page, it is a workaround. You can vote for the feature request here: https://jira.atlassian.com/browse/JRA-7687

What if i don't want to change global settings, As it would impact for all other project.

0 votes
Joseph Pitt Community Champion Apr 24, 2012

If you don't want to modify the code making the field required will remove None

Thomas Schlegel Community Champion Apr 24, 2012

that's true, this doesn't work, as you can read in the feature request, I've mentioned yet: https://jira.atlassian.com/browse/JRA-7687

I tried but its not removing None from select List.

Hey Guys,

I achieved this by using javascript.

By the way thank you for your suggestions.

Ragards,

Atul

You have to make the field required, then the 'none' won't be there anymore.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

59 views 0 2
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