Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

Displaying a searchable list of users in a generated dialog pop-up


Hello :)

I have set-up a script fragment with an associated REST Endpoint, to generate a dialog pop-up (please see screenshot). The current implementation is that the user selects as assignee from a drop-down list, an issue type from a drop-down list, and hits create to clone the current task as a sub-task, with the selected parameters from the pop-up.

The issue is that having a drop-down select list of assignees is bad as it isn't scalable. My intended implementation is for the assignee field to act similarly to the reporter/assignee field when creating an issue, where the user can start typing a name and a list of suggestions appears and updates with every keystroke. I'm struggling to figure out a way of making this happen.

My research leads me to believe that I need to use a custom field embedded within HTML in some way. However I'm at a total loss with how to do this. I'm not even sure if using a custom field is the right way to go about implementing this, is there some other way that I've missed.?

Below is my code for displaying the pop-up dialog, as you can see right now it displays the assignees as select options within a form. Any direction would be very much appreciated, thank you.

import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue

@BaseScript CustomEndpointDelegate delegate

cloneSubTaskDialog { MultivaluedMap queryParams ->

def issueKey = queryParams.getFirst("issueKey").toString()
def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject(issueKey)

// createIssue endpoint to run upon submitting form
def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
def actionUrl = """

def header = """
<header class="aui-dialog2-header">
<h2 class="aui-dialog2-header-main">Clone ${issueKey} as Sub-Task</h2>
<a class="aui-dialog2-header-close">
<span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span>

def assigneeSelectHTML = ""
ComponentAccessor.userManager.getAllApplicationUsers().each { type ->
assigneeSelectHTML += "<option value=${}>${}</option>"

def issueTypesSelectHTML = ""
ComponentAccessor.constantsManager.subTaskIssueTypeObjects.each { type ->
issueTypesSelectHTML += "<option value=${}>${}</option>"

def content = """
<div class="aui-dialog2-content">
<p>Select an assignee and issue type for the Sub-Task</p><br>
<form id="clone-form" class="aui" action="${actionUrl}">
<select name="assigneeId">
<p>Issue type</p>
<select name="issueTypeId">
<input name='projectId' type='hidden' value="${issue.getProjectId()}">
<input name='reporterId' type='hidden' value="${issue.reporterId}">
<input name='summary' type='hidden' value="${issue.summary}">
<input name='description' type='hidden' value="${issue.description}">
<input name='priorityId' type='hidden' value="${}">
<input name='parentId' type='hidden' value="${issue.getId()}">

def footer = """
<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button type="submit" form="clone-form" class="aui-button aui-button-primary">Create</button>
<div class="aui-dialog2-footer-hint">All issue details will be copied over into the new Sub-Task</div>

def dialog = """
<section id="static-dialog" class="aui-layer aui-dialog2 aui-dialog2-medium" role="dialog" aria-hidden="true">




2 answers

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 28, 2019

Hi Luke,

Thank you for your question.

I can confirm that ScriptRunner for Jira Server only has limited support for Dialogs as described in the documentation page located here.  

This means that with dialogs that to anything advanced such as creating a field which searches for users that you would need to write a bespoke javascript function that would search for the users that were typed in the field, as ScriptRunner for Jira Server contains no built in functionality to be able to put standard Jira custom fields such as User Picker fields on the Dialog.

I understand that this response is frustrating but please understand that the methods do not exist to create this functioanlity as explained above.




No worries, thank you for the response.

Hello Luke,

I'm in a similar situation where I have a list of values (just good old strings, nothing fancy) from a custom field displayed in a select list, and I'd like to be able to offer suggestions as the user starts typing in a search text field.

I was wondering where you ended up with your problem and if you'd have any suggestions or pointers for me. I'm not a JavaScript person but I have just about enough experience in coding that I should be able to cook something up once I have the starting point. 

Thank you so much!


@Luke Jones 

@Kristian Walker _Adaptavist_ 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events