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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Notifications to users in multiple projects

Hi Team,

Could you please suggest how to implement this ?

On a given project = Change Management BI Implementation (CHGIMPBI), with ABC component, reported by XYZ resource
if XYZ try to transition this ticket to "waiting for approval", can we add a trigger to let XYZ notified along with BBB who is the assignee to a ticket  with  BI Implementation (BIIMPL) project with "in progress" status and the ABC component?

We have script runner, JMWE, JSU , addons, we are on v8.13.3.

Thanks!

1 answer

0 votes
Leo Community Leader Mar 11, 2021

Hi @Lakshmi S,

I believe you can do that with scriptrunner's postfunction

If I understood correctly

if(currentuser == xyz/reporter){

  assignee = assignee of 2nd project issue

  sendmail to assignee& reporter/xyz

 

below is the snippet I used with a project to send custom mail

if(isThere){
ApplicationUser user = userManager.getUserByName("kagovin2")
watcherManager.startWatching(user, issue)
def emailBody = "body "
sendEmail("mail1, mail2", "some text", emailBody)
}

def sendEmail(String emailAddr, String subject, String body) {
SMTPMailServer mailServer = ComponentAccessor.getMailServerManager().getDefaultSMTPMailServer()
if (mailServer) {
Email email = new Email(emailAddr)
email.setSubject(subject)
email.setBody(body)
mailServer.send(email)
log.warn("Mail sent")
} else {
log.warn("Please make sure that a valid mailServer is configured")
}
}

 

BR,

Leo

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

106 views 0 2
Read article

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