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

Scriptrunner: Dialog to feature assignee search field

I'm trying to implement a popup dialog on web item click using ScriptRunner. The Adaptavist docs on the subject are sorely lacking, and it doesn't seem to be widely documented elsewhere.

Can anyone point me at some resources, or provide some sample code, to help me have an assignee search field appear on the dialog? 

The dialog will prompt the user to choose between available sub-task types, pick an assignee and then hits an endpoint with given data to create a sub-task. 

My dialog code so far:

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

@BaseScript CustomEndpointDelegate delegate

createSubTask { MultivaluedMap queryParams ->
def typesOptionsHTML = ""
def allIssueTypes = ComponentAccessor.constantsManager.subTaskIssueTypeObjects.each { type ->
typesOptionsHTML += "<option value=\"${}\">${}</option>"

def issueKey = queryParams.getFirst("issueKey") as String

def dialog =
"""<section role="dialog" id="sr-dialog" class="aui-layer aui-dialog2 aui-dialog2-medium" aria-hidden="true" data-aui-remove-on-hide="true">
<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>

<div class="aui-dialog2-content">
<p>Select an assignee and issue type for the Sub-Task</p><br>
<div id="container" style="width:px">
<form class="aui">
<div id="type">
<div class="aui-dropdown2-section">Type:

<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button id="dialog-close-button" class="aui-button aui-button-link">Close</button>
<div class="aui-dialog2-footer-hint">All issue details will be copied over into the new Sub-Task</div>


Also, as an aside, I could do with some explanation on the classes used in the Adaptavist examples. Are these implemented by JIRA - can I just use these to maintain a consistent style? Are these documented anywhere? 





0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events