Edit in JSFiddle

$(document).ready(function() {

  var data = [
    { id: '', text: '' },
    { id: 0, text: 'enhancement' }, 
    { id: 1, text: 'bug' }, 
    { id: 2, text: 'duplicate' }, 
    { id: 3, text: 'invalid' }, 
    { id: 4, text: 'wontfix' }
  ];


  $('select').select2({
    placeholder: "Select a state",
    allowClear: true,
    data: data,
    minimumResultsForSearch: Infinity //Hiding the search box
  });
  
  $("#readValue").click(function(e){
  	alert("value is " + $('select').val());
  })
  $("#setBug").click(function(){
  	$('select').val(1).trigger('change');
  })
  $("#setEmpty").click(function(){
  	$('select').val(null).trigger('change');
  })
  
});
<select name="status" style="width: 30%">
</select>
<br>
<br>
<button id="readValue">Read Value</button>
<button id="setBug">Set "Bug"</button>
<button id="setEmpty">Clear</button>

              

External resources loaded into this fiddle: