Open a popup on clientside from a groovy serverside script

Hi,

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.

Regards.

2 answers

1 accepted

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.

1 vote

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
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 Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

184 views 0 4
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