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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

184 views 1 11
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