is there any way to show alert messages through script runner in JIRA Cloud using script listeners or post function

Jyotiprakash Nayak March 21, 2017
 

1 answer

2 votes
Jon Mort [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2017

Hi Jyotiprakash,

We don't have a way to do this right now but it is something we've got on our backlog to do. It is much more complex than on JIRA Server.

Jon

invi8 August 9, 2018

@Jon Mort [Adaptavist] Hi! Is there any way to show messages through script runner in Jira Server using script listener? or catch system UserMessageUtil and change its text?

Thanos Batagiannis _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2018

Hi Sofiedan,

For ScriptRunner for Jira Server as you already guessed, you can use the UserMessageUtil, for example for a success message 

import com.onresolve.scriptrunner.runner.util.UserMessageUtil

UserMessageUtil.success('Good job! ')

regards, 

Thanos 

invi8 August 9, 2018

@Thanos Batagiannis _Adaptavist_ 

Thank you! I guess in my case the message didn't appear, because it was inside the cycle.

changeItems.each {it ->
if (it.field == "Attachment") {
UserMessageUtil.info('Text')
}
}
Like VVor likes this
Vineela Durbha February 14, 2019

Hi @Thanos Batagiannis _Adaptavist_

I am trying to print the errors collected from error collection as below

if (createValidationResult.isValid())
{
log.error("entrou no createValidationResult")
IssueService.IssueResult createResult = issueService.create(currentUser, createValidationResult)
if (!createResult.isValid())
{
log.error(createResult.getErrorCollection())

log.error("Error while creating the issue.")

def errorCollection=createResult.getErrorCollection().getErrors().values();


for (String error: errorCollection){
log.debug("inside error collection" )
UserMessageUtil.error("Error : ")
}

}
}

 

 

But it is throwing error message twice. Am i doing something wrong

Stefan Brocanelli May 25, 2020

Has this feature been implemented for Jira Cloud? It's been about 3 years now since it was on the Backlog.

Like # people like this

Suggest an answer

Log in or Sign up to answer