Open a popup on clientside from a groovy serverside script

Bastien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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

0 votes
Answer accepted
Bastien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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.

Bastien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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

Bastien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events