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!
Hi @Lakshmi CH,
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.