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

How do I send email notification to linked issue assignee

Hi,

I have Issue A with Links Issue B , Issue C and Issue D.

Issue B and Issue C are TASK

Issue D is Defect issue type.

 

Now I needs to send email to Issue D assignee when Issue A during transition. I am looking at script runner email notification but not finding the way to get Linked issue assignee in script runner email notification.

 

Looks to me I needs to have one scripted field that should hold Issue D assignee and then write the custom email notification during issue A transition.

Any advise.

 

1 answer

1 accepted

0 votes
Answer accepted

Hi,

You need to use Send a custom email which is a Script Post-Function.

There is a similar example here. In the example instead of watchers just fetch the linked issue assignee.

Ravi

I used below piece of code

 

 def destinationIssue = it.destinationObject
if(destinationIssue.getIssueType().getName() == "Work Request"){
emailAddressTo = destinationIssue.assignee.emailAddress
if(emailAddressTo){
def strSubject = "APRA Story ${issue.key} has been moved to ReWork"
def strBody = """${issue.key} has been moved to Rework. Needs to work on WorkRequest ${destinationIssue.getKey()}"""
sendEmail(emailAddressTo, emailAddressesCC, strSubject, strBody)
}
Like Ravi Sagar -Adaptavist- likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

273 views 1 2
Join discussion

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