How is the multi-user popup launched?

I'm trying to write a custom field that is similar to the multi-user field. (It contains a list of items and has a popup used for finding additional items to add to the list.) However, I haven't been able to figure out how the multi-user field is launching its popup.

In the Jira source, /jira-project/jira-components/jira-core/src/main/resources/system-customfieldtypes-plugin.xml shows the velocity template to be here: templates/plugins/fields/edit/edit-multiuser.vm

The velocity template contains this link:
<a class="popup-trigger" href="#"><span class="aui-icon icon-userpicker" title="$i18n.getText('')"></span></a>

That appears to be a link to nowhere. Something must be overwriting the target of that link, because clicking it opens a popup with this url: /secure/popups/UserPickerBrowser.jspa?formName=jiraform&multiSelect=true&decorator=popup&element=customfield_10000

The actions.xml contains this definition for UserPickerBrowser:

&lt;action name="admin.user.UserPickerBrowser" alias="UserPickerBrowser" roles-required="pickusers"&gt;
        &lt;view name="success"&gt;/secure/popups/userpicker.jsp&lt;/view&gt;
        &lt;view name="input"&gt;/secure/popups/userpicker.jsp&lt;/view&gt;

What I can't figure out is what determines that clicking that link triggers the UserPickerBrowser action. Can anyone help me out?

I have also tried following this tutorial for creating a dialog:
But it seems to be broken. Immediately after checking the code out of git, the "atlas-integration-test" command fails. Ignoring that failure and continuing the tutorial does me no good, because the "atlas-run" command fails to launch jira from that project (I've had no issues launching jira from my other projects).

2 answers

1 accepted

0 votes
Accepted answer

I didn't figure out exactly how the multi-user popup is launched, but I am able to launch a popup using javascript in the onclick event:

<a class="popup-trigger" href="/jira/secure/popups/Test.jspa" onclick="'/jira/secure/popups/Test.jspa?element=${}', 'pams_asset_browser', 'width=780, height=575, resizable, scrollbars=yes'); return false;">

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,787 views 18 22
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you