Open a popup on clientside from a groovy serverside script


Is it possible to open a popup (like a javascript alert) from a groovy script (executed on the server) ?
I mean my script is executing during a transition post function, and I want to alert the user if something doesn't work.

Thank you.


2 answers

1 accepted

0 votes
Accepted answer

I change my post function script into a validator script, with an InvalidInputException.

The user has a red message when the transition cannot pass because of the script :)

Thank you again Jamie.

Not really... best thing is to add a comment to the issue notifying the user that it didn't work. This is easiest, and most reliable, and also means that the user will be notified by email. In the case that the transition was done via REST api or something they wouldn't get any popup.

Hum ... Ok :/
The mail notification is not a good solution in this case.

My post function script move the mother issue into another state. But if one or more mandatory fields are not filled, the script does not pass the mother transition. (I use your Behaviours plugin for mandatory fields). And in this case, i want to alert the user that the mother has madantory fields not filled, and so the mother cannot pass into the next state.

You could do that checking in a validator... if validation passes, then you know the transition on the parent will succeed.

Oh yeah, why did I don't think about it earlier ?!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

457 views 8 27
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