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

How to get custom field name in the Email Template using script runner?

Hello All,

I was able to get custom field(text) value with the below script in custom email script runner in workflow transition post function.

Custom message here: <% out <<issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name")
) %>

 Output is as below:

Custom message here: Test123

But i want to replace Custom message here with custom field name.

Ex - Custom field Name: Test123

Is it possible? Please help.

Thanks in advance,


1 answer

1 accepted

0 votes
Answer accepted
Tuncay Senturk Community Leader Sep 07, 2019

Hi mani@123 

Sorry if I did not understand clearly, but you're already using hard coded custom field name.

com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name")

Here, Custom Field Name is the name of the custom field.

Anyway below code gives you the name of the custom field.

com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name").getName()

You can also get custom field name by custom field ID


 where customfield_10xxx is the ID of the custom field.

I hope I was clear.



Thanks Tuncay

Do you know how to change Text in email into Bold like below.


Tuncay Senturk Community Leader Sep 07, 2019

Try putting the text within <b> tags.

<b>bold text</b>

It is not working. When i added the tags output i am getting like below in the emails:

<b>Submission IDs</b>

mani@123did you find a solution for your problem?

Suggest an answer

Log in or Sign up to answer