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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

66 views 0 5
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