A
A
a_yanduganov2017-07-24 13:17:40
HTML
a_yanduganov, 2017-07-24 13:17:40

How to use Single user picker in a plugin in JIRA?

Actually, on a subject.
I am writing a plugin for JIRA, I need to implement the user's choice. I'm trying to use the built-in user select field. In general, it supports two input methods: keyboard input (using autocomplete) and selection using the user select box, where it can be found by any field. The problem is that user substitution from this window works, but autocomplete does not. I dug through a bunch of forums, found nothing. More precisely, I found it, but all the answers are far from reality.
I create the field like this:

<div class="ajax_autocomplete atlassian-autocomplete" id="main_user_container">
    <input class="text autocomplete-user" id="main_user" name="main_user" data-template="{username}">
    <a class="popup-trigger" href="#" autocomplete="on" onclick="window.open('../../secure/popups/UserPickerBrowser.jspa?formName=patch_access&multiSelect=false&decorator=popup&element=main_user', 'pams_asset_browser', 'width=780, height=575, resizable, scrollbars=yes')">
        <span class="icon-default aui-icon aui-icon-small aui-iconfont-admin-roles" title="Выбрать пользователя"></span>
    </a>
    <div class="ajax_results" id="main_user_results"></div>
    <div class="description">Начните набирать для получения списка доступных совпадений.</div>
</div>

Maybe you need to write something in the script? Or maybe I'm using it all wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question