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

1 vote

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.

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

827 views 2 9
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