Tuesday, 13 September 2011

Remove 'None' Option from Radio Button or Select List in JIRA

Simple way to remove 'None' Option from Radio Button

1.) Select Field Configurations options from JIRA Admin .
2.) Select desire fields like radio/select list upon you applied such script to remove 'none' option
3.) Select Edit option , front of fields name.
4.) Paste such script (below) on Edit Field Description


<script type="text/javascript">
radio= document.getElementById('customfield_11260_none');
radio.style.display='none';
elem= document.getElementById('customfield_11260_none');
do {
  elem = elem.nextSibling;
} while(elem.nodeType != 1); // 1 == Node.ELEMENT_NODE
if(elem) elem.style.display = 'none';
</script>

5.) Update .


 Simple way to remove 'None' Option from Select List 

Follow up the simple way

Paste this script on Edit Field Description

 <script type="text/javascript">
try{
var select = document.getElementById('customfield_11490');
//select.options[0].text="";
select.remove(0);
}catch(err){}
</script>

Update ..........


customfield_11260_none name of 'none' option fields . right click on the browser and search fields name like customfield_<id_of_fields>_none.


Or either use firebug to find out the fields values .





2 comments:

  1. 1.) Get/Set value from cascading Select List in JIRA .


    http://confluence.atlassian.com/display/JIRACOM/How+to+Set+the+value+of+a+cascading+select+list+in+an+issue.

    ReplyDelete
  2. http://confluence.atlassian.com/display/JIRACOM/Example+SQL+queries+for+JIRA

    ReplyDelete