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('user.picker.select.users')"></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;
    &lt;/action&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:
https://developer.atlassian.com/display/JIRADEV/Displaying+Content+in+a+Dialog+in+JIRA
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="window.open('/jira/secure/popups/Test.jspa?element=${customField.id}', 'pams_asset_browser', 'width=780, height=575, resizable, scrollbars=yes'); return false;">

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,815 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot