Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SMS notification via scriprunner Edited

Hi,

I am new to script runner and need to configure SMS notifications when a user creates a bug with 1 or 2 severity. I found the below-mentioned script in the community for email notifications. Can someone help me to rewrite it for SMS notifications?

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.project.VersionCreateEvent
import com.atlassian.jira.event.project.VersionUpdatedEvent
import com.atlassian.mail.Email
import com.atlassian.mail.queue.SingleMailQueueItem

def email = new Email("some@example.com")

if (event instanceof VersionUpdatedEvent){
def event = event as VersionUpdatedEvent
email.setSubject("Version updated")
email.setBody("Version release date: ${event.version.releaseDate}")
// email.setMimeType("text/html") // for messages with an html body
SingleMailQueueItem item = new SingleMailQueueItem(email)
ComponentAccessor.getMailQueue().addItem(item)
}
else if (event instanceof VersionCreateEvent){
def event = event as VersionCreateEvent
email.setSubject("Version created")
email.setBody("Version release date: ${event.version.releaseDate}")
// email.setMimeType("text/html") // for messages with an html body
SingleMailQueueItem item = new SingleMailQueueItem(email)
ComponentAccessor.getMailQueue().addItem(item)
}

 

I know that there are plug-ins available on the market for sending SMS, but I need to do it  via script runner

Will highly appreciate any help/guidance. 

 

Thank you!

Valeriya

 

1 answer

0 votes
Rano I'm New Here Apr 26, 2021

Hello) have you found a solution to implement this functionality?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you