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 dropdown menu appears top left of screen without rest of dialog

I have below a JIRA endpoint script that displays a dialog on web-item press. The dialog features a dropdown menu, which is not working as expected. I've been following the guidelines on

I've no idea why it's misbehaving - any help appreciated! 


1 - I navigate to my task which shows the web-item button, and click it.

2 - The dialog appears, and looks as expected. I can select from the dropdown menu correctly, and the press the X top right of the dialog to close.

3 - I then press the web-item button again, and the dialog reappears. It looks as it should.

4 - When I select the dropdown again, the dialog disappears completely, and only the dropdown menu can be seen - which has now moved to the top left of the screen. 


import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor
def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)

@BaseScript CustomEndpointDelegate delegate

createSubTask { MultivaluedMap queryParams ->

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

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 typesOptionsHTML = ""
def allIssueTypes = ComponentAccessor.constantsManager.subTaskIssueTypeObjects.each { type ->
typesOptionsHTML += "<aui-item-radio interactive>${}</aui-item-radio>"
def content = """
<div class="aui-dialog2-content">
<p>Select an assignee and issue type for the Sub-Task</p><br>
<button class="aui-button aui-dropdown2-trigger" aria-controls="types-dropdown">Pick a Sub-Task type</button>
<aui-dropdown-menu id="types-dropdown">
<aui-section label="Sub-Task Types">

def footer = """
<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>

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


Also, whenever I paste code into these questions it removes the formatting - how can I preserve my format?


0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events