Hello @Dan27
As i remember you are using scriptrunner.
You can do it via Script validator
Or if you need to throw message right on form changes, you can create behaviour using methods setError()/clearError()
https://scriptrunner.adaptavist.com/5.4.12/jira/recipes/behaviours/scripted-conditions.html
Thanks! :) @Mark Markov
Can I use the setError without the form changes?
I use a script listener that when issue is updated, I check a condition, If it's true I would like to make the error popup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Markov I want to do it by script listener, is it possible ??
why it doesn't work?
if(fixVersions!=fixVersionsEpic)
{
showDialog() { MultivaluedMap queryParams ->
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">Some dialog</h2>
<a class="aui-dialog2-header-close">
<span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span>
</a>
</header>
<div class="aui-dialog2-content">
<p>Testing a dialog button...</p>
<form class="aui">
<div class="field-group">
<label for="text-input">Labels to add<span class="aui-icon icon-required">required</span></label>
<input class="text" type="text" id="text-input" name="text-input" title="Label to add">
<div class="description">Test description</div>
</div>
</form>
</div>
<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button class="aui-button aui-button-primary">Save</button>
<button id="dialog-close-button" class="aui-button aui-button-link">Close</button>
</div>
<div class="aui-dialog2-footer-hint">Test hint</div>
</footer>
</section>
"""
Response.ok().type(MediaType.TEXT_HTML).entity(dialog.toString()).build()
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.