Script Runner - display a message in scripted JQL function, same as aggregateExpression

Hi,

 

I am working on a scripted JQL function and need to display a message similar to what aggregateExpression() does. How can I do it?

 

-Andrey

2 answers

This widget could not be displayed.

The way aggregateExpression works is not really extensible... you need some javascript resources available to post to a rest endpoint when it recognises that the query involves your special function, and it involves running the query twice. JIRA runs it once, then the rest API runs it in order to return the message.

I have not tried using this approach - https://jamieechlin.atlassian.net/wiki/display/GRV/Providing+feedback+from+scripts - it may work, although you may well not want to display the message like that.

This widget could not be displayed.

HI,

 

yes, I've tried this method - sorry I did not mention it in the original question - and it does not seems to work. Nothing happens, no message displayed, no messages in the log, just nothing.

When you refresh the page do you see the issue? If not, perhaps you are doing something wrong.

Oh, I see. The message actually appears in the Issue Browser but only when you run the jql for the first time or refresh the page. I have been hitting Enter in the jql input line to re-run my query. Re-running the query by hitting Enter, or by clicking the refresh icon in the Issue Browser does not make the message appear. I understand why. You may be right saying I might not want to display it like this.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 25, 2018 in Marketplace Apps

Jira Cloud and Bitbucket Cloud Integration with Microsoft Teams

One of the newest products in the Microsoft family - Microsoft Teams,  is a chat-based hub for teamwork that integrates all the people, content, and tools your team needs to be more engaged and ...

718 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you