Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

<aui-select> in searcher's template


I have created custom field that stores ids in DB but in all templates it maps those ids to values. Now I wat to create searcher for that field and it should show to user not ids, but values. I used <aui-select> in template, but dropdown with options renders below dropdown with field form:


Code for template:

$!{auiparams.put("controlHeaderClass", "aui-field-text")}
#searcherEditHeader ($ $
<aui-select id="searcher-$" name="$">
#foreach($selectorOption in $selectorOptions)
<aui-option value="$selectorOption.getGuid()">$selectorOption.getName()</aui-option>
#searcherEditFooter ($ $customField.description)

Does anybody know how to fix it? Or is there a better way for such logic?

Actually, I would better use template like for "Asignee" field, is there a posibillity to look how it's done or reuse it? I have looked though documentation and searched a lot, but didn't find  any information about templates for searchers (more than just "how to add searcher to custom field"). Or even any explanation about which macros I can use in template.

2 answers

Hi again. I've solved the issue.

What you're looking for is not the searcher but edit temlate.

they're stored in your Jira installation directory JIRA\atlassian-jira\WEB-INF\classes\templates\jira\issue\field

for me worked this edit temlate code (myltiselect AUI-select2-styled field)

#controlHeader ($action $ $ $fieldLayoutItem.required $displayParameters.noHeader)
<script type="text/javascript">
AJS.toInit(function () {
## alert("template script running");
<select class="js-example-placeholder-single js-states form-control"
name="$" id="$" multiple="multiple">
#foreach ($option in $configs.options) ## it was critical use configs.options instead of options
<option value="$option">$option</option>
#controlFooter ($action $fieldLayoutItem.fieldDescription $displayParameters.noHeader)

 github link for whole plugin -

Hi Andrii.

Have you procced with it?

I'm facing similar task now. need to implement more convinient input template to multiselect customfield. (something like the searcher of columns in issue navigator)

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you