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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

ScriptRunner custom email doesn't show the message

I'm trying to send a custom email to the assignee\reporter, the email is being sent but it only shows the subject, not the message. 

I use the template that ScriptRunner suggest:

def fields = get('/rest/api/2/field')
.body as List<Map>

def customFieldId = fields.find { == 'Category' }.id as String
def customFieldValue = (issue.fields[customFieldId] as Map)?.value

"""Dear ${issue.fields.assignee?.displayName},

The ${} ${issue.key} with priority ${issue.fields.priority?.name} has been assigned to you.

Description: ${issue.fields.description}

Custom field value: ${customFieldValue}



And I tried to modify the text but nothing works. What is wrong? How can I make the text appear in the email's body? 


1 answer

0 votes
Ravi Sagar _Sparxsys_
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.
Jan 03, 2021

Hi @inna grin 

I guess you are using the post function where the send email will use the Jira email templates.

What you can try is creating a listener and use the script here. You will also find this script in the examples. This script should let you send an email with custom subject and body. The mail will not be sent if the changes are made by the same person.

It is using the following REST end point also mentioned here.

POST /rest/api/3/issue/{issueIdOrKey}/notify

I hope it helps.


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events