Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Send email when a issue is assigned

Aravindh P May 22, 2025

When a ticket is assigned to a user, send a email like below. If the ticket got unassigned also this should work. Can anyone help me fill the "?" with smartvalues? I have tried multiple values, none of them working as expected.

 

Mail:
To: old and new assignee ?
CC: assignedby ?

Hello,

The assignee for issue {{issue.key}} ({{issue.summary}}) has been changed.

Old Assignee: ?
New Assignee: ?
Assigned by: ?

Issue Link: {{baseUrl}}/browse/{{issue.key}}

Regards,
Aravindh P

2 answers

2 accepted

1 vote
Answer accepted
Akash Singh
Community Champion
May 25, 2025

Hi @Aravindh P

You would first need to create a Field value changed trigger and start looking out for any changes to Assignee field and use below template for Send email action.

To: Assignee (from dropdown)

CC: {{initiator.emailAddress}} (smartvalue)

Hello,

The assignee for issue {{issue.key}} ({{issue.summary}}) has been changed.

Old Assignee: {{fieldChange.fromString}}
New Assignee: {{fieldChange.toString}}
Assigned by: {{initiator.displayName}}

Issue Link: {{issue.url}}

Regards,
Aravindh P

Fetching email address for previous assignee is not easy and you could use Jira API to fetch the details as described in this article.

You would need to add another action, Send web request, before sending the email, 

  1. Request URL: https://<yourinstance>.atlassian.net/rest/api/3/user/search?accountId={{fieldChange.from}}

  2. Headers:

    1. Authorization: Basic <base64_encoded_api_token>

    2. Content-type: application/json

  3. HTTP Method: GET

  4. Web Request body: Empty

  5. Delay execution...: checked

  6. Finally add {{webResponse.body.emailAddress}} in To field of Send email action.
Aravindh P June 10, 2025

Great, Thanks for the response @Akash Singh 

0 votes
Answer accepted
arielei
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.
May 22, 2025

Hello @Aravindh P 

New Assignee: {{issue.assignee.emailAddress}}
Assigned by: {{initiator.emailAddress}}

Also. in Issue Link you can simply use {{url}} instead of what you wrote.

 

as for Old Assignee, there isnt a straight forward method to fetch it as the trigger will run the automation only post change.

so i would suggest to add a user picker custom field and create an automation that when ever the assignee field is changed, it will copy the value to that field and so you can combine it in the same automation you have and then use {{issue.Custom Field.emailAddress}} for the Old Assignee

arielei
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.
June 9, 2025

@Aravindh P 

Did you try it?

Aravindh P June 10, 2025

Hi arielei,

New Assignee: {{fieldChange.toString}}

I have used the above line in the email component, and it worked. Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events