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



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



2 answers

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 - - it may work, although you may well not want to display the message like that.



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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,711 views 3 11
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