Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom dialog window with search function and customfields

Oleksii Okhmush
Contributor
March 15, 2020

Hello everyone!

I try to create custom dialog where i want to use IssuePicker custom field, and after selecting issue with this custom field show some customvields value from picked field

 

Using scriptrunner i created Web-fragment to initiate REST endpoint:

my.domain.siterest/scriptrunner/latest/custom/showDialog

 

My REST endpoint shows dialog window

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.transform.BaseScript
import javax.ws.rs.core.MediaType
import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response
@BaseScript CustomEndpointDelegate delegate

showDomain() { MultivaluedMap queryParams ->
def dialog =

"""<section role="dialog" id="sr-dialog" class="aui-layer aui-dialog2 aui-dialog2-large" aria-hidden="true" data-aui-remove-on-hide="true">
<header class="aui-dialog2-header">
<h2 class="aui-dialog2-header-main">Domain Lookup</h2>
<a class="aui-dialog2-header-close">
<span class="aui-icon aui-icon-large aui-iconfont-close-dialog">Close</span>
</a>
</header>
<div class="aui-dialog2-content">
<p><b>Enter domain: </b>
<form class="aui" action="#">
<input id="domain-search" class="text" type="search" name="domain">
<button class="aui-button ">Search</button>
</form>


<br> <hr>





</div>

<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button id="dialog-close-button" class="aui-button aui-button-link">Ok</button>
</div>


<div class="aui-dialog2-footer-hint">Hint for use </div>

</footer>
</section>

"""
Response.ok().type(MediaType.TEXT_HTML).entity(dialog.toString()).build()
}

Is it possible to use IssuePicker customfield in <input> section

Or if its not possible, enter some text in this <input> and them search using JQL with this input and shows information in this dialog window?

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.13.8
TAGS
atlassian, aafp, jira migration, marketing collaboration, end siloed work, streamline workflows, kerrie gottschalk, jira cloud admins, unified marketing, process visibility, team efficiency, cross-team collaboration

How Kerrie Gottschalk unified AAFP’s marketing team with Jira

At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.

Read the story
AUG Leaders

Atlassian Community Events