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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 get the value of custom field in Send custom email post-function?


I configured a "Send custom email" postfunction and it should use on of my custom fields (Text field type) to fill in the subject and body template. I looked at and but none of this seems to work for me.

This is a subject template I use:

${issue.key} My subject: <% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("customField_name")) %> ${cfValues['customField_name'] ?: ""}

This is body template I use:

Custom field value: <% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("customField_name")) %>

${cfValues['customField_name'] ?: ""}

In an email I get:


JSD-123 My subject: &lt;% out &lt;&lt; issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("customField_name")) %&gt;


For issue.getCustomFieldValue... I get Java error during Preview although this exactly follows the example in :-(

Using ${cfValues['customField_name'] ?: ""} returns nothing similarly to subject

Any ideas? Documentation seems not to be helpful here or I'm missing something.



1 answer

Hi @Szymon Trocha 

I have checked on my instance, work well.

Custom field value: <% out << issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("ios dev")) %>

Could You please check name of the custom field?



Hi Andriej,

Thank you for help. It works now when I used:


Do you maybe know and can explain why I needed to use ComponentAccessor instead of componentManager and the the full path "com.atlassian.jira.component.ComponentAccessor" ?



Suggest an answer

Log in or Sign up to answer
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

231 views 3 5
View question

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