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

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 - - 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
Posted Thursday in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

1,642 views 4 6
Join discussion

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