Custom Issue Picker

Hello.
I have created a custom issue picker as a custom field type. I used JIRA source code for it. It works, but I have two questions.

  1. How to hide button Plus, which opens the Issue selector’s dialog?
  2. I need to have a single-issue picker. Although, if I remove multiple tag or set multiple=“false”, it will remain multiple anyway. How to make it single?
<select class="aui-field-issuepicker hidden" name="$customField.id" id="$customField.id"
data-remove-on-un-select="true"
data-ajax-options.query="true"
data-ajax-options.url="${req.contextPath}/rest/api/1.0/issues/picker"
data-ajax-options.data.show-sub-tasks="true"
data-ajax-options.data.show-sub-task-parent="true"
data-ajax-options.data.current-project-id="" >

Would be glad for any help.

Hi, I had the same issue today and what I did, as a workaround, was to remove the previous selection and keep just the last one (unfortunately, it requires a sort of global variable to avoid an infinite loop):

AJS.$("#jira-issues-picker").on("selected", function(e, data) {
	var issuePicker = AJS.$(this);
	var issueKey = data.properties.value;
	if (issuePicker.attr('selection') !== issueKey) {           // any custom attribute or global variable
		issuePicker.attr('selection', issueKey);                  // prevent the infinite loop
		issuePicker.trigger('clearSelection');                    // remove all existing selection
		issuePicker.trigger('selectOption', [{value: issueKey}]); // keep (select again) the last option
	}
});