Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,671
Community Members
 
Community Events
184
Community Groups

JIRA CLOUD - How to send custom Alerts. UserMessageUtil for Cloud?

Roberto L
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.
Jul 22, 2021

Hello Community,

Thank you for taking the time to look at my post!

I am working in JIRA CLOUD and I would like to create a custom Alert that will be execute when an issue is updated (I am using a Listener).

The use case is:

User updates a certain field. This triggers an issue update even which is captured by a listener I created. This listener has code that will transition the issue from X to Y status (this works fine).

My gap is:

When the transition code runs in the listener I will check for a status code of 204 (success). If this statement is true then I want to add code that will display an Alert with a custom message "Your issue was transitioned from status X to Y because of _____".

In JIRA Server/DC you can use UserMessageUtil for the above but for CLOUD I cannot find a similar library.

Does anyone have any insight on how I can add this functionality into my Listener code.

Thank you!
-Roberto

2 answers

Hi @Roberto Luces ,

I can confirm that there is no way to display a popup dialogue showing when listener are being triggered with ScriptRunner for Jira Cloud as Atlassian does not provide any Rest API's for displaying popup dialogues and ScriptRunner for Jira Cloud can only use the Rest API's which Atlassian provides.

However, you could work around this by having your script call the Add Comment API to add a comment when the listener triggered and I can confirm we have an example of using this API here which can be used as a reference to see how to use this API.

Alternatively, you could work around this by having your script call the Send notification for issue API to to notify via email and I can confirm we have an example of using this API here.

I hope that answered your question.

Regards,

Amirul

look forward for this solution when APIs are available

0 votes
Liam Green
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.
Jul 30, 2021

Hi @Roberto Luces 

Is there a reason you don't want to use Automation to do this?

Thanks,

Liam

Roberto L
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.
Jul 30, 2021

Hello @Liam Green ,

No specific reason as to why Listener over automation other then the existing functionality I mentioned above might expand further in the same listener and I wanted to see if there is something like UserMessageUtil that I can add to other ScriptRunner scripts as well.

If I may ask, how would you achieve the above using Automation?

Thank you,

-Roberto

Suggest an answer

Log in or Sign up to answer