How to add custom fields to email template

Hi,

Please suggest me how I can add custom fields in the create screen to create issue email template?

Also I'm having around 50 custom fields in the create screen across all the eight issue types and want to know

1. whether I can add all these custom fields to create issue template or I need to use different template for each workflows?

2. If having single issue create template then all the custom fields will be show it in email or only value contains custom field will be visible in email?

3. I got that following parameter needs to be add for displaying the custom field in email, $issue.getCustomFieldValue("customfield_10150")

but where in create issue template I can place this kind of 50 parameter?

Many thanks in advance.

Thanks,

Sanu P Soman

1 answer

1 accepted

0 votes

You could always read the docs - https://confluence.atlassian.com/display/JIRA/Customising+Email+Content

For the other questions:

1) I don't think I fully understand the question. You can put the fields on the create screen for each individual project/issuetype, or groups, or you can use the same screen for everything. Up to you.

2) Either. The standard behaviour is not to include empty fields in emails, and that's what the docs cover, but you can override it if you want.

3) Again, I really don't understand the question. What is a "create issue template"? Do you mean the create screen? If so, then you add fields by their name, not custom field ID. If you don't mean the screen, then I'm utterly lost and you'll need to explain more.

I think you probably need to work through https://confluence.atlassian.com/display/JIRA/Configuring+Fields+and+Screens as well - that should guide you through the basics

I mean create issue template is the create issue event(notification event) in JIRA specifying in "createissue.vm" file.

So how I can add create screen custom field details in createissue.vm file ?? Please guide me.

Thanks.

It's in the documentation I referred to. That tells you how to add fields to the templates. I don't know how else I can explain this.

Could you explain what you are not understanding in the docs?

Could you please clarify me exactly where I can add the following parameter in createissue.vm file

$issue.getCustomFieldValue("customfield_10150"), any specific line is there or I can add it in any line.

Think of the createissue.vm as a template for creating the html. It will be read from top to bottom, one word or phrase at a time. If a phrase starts with a # velocity will see it as a directive (#if, #else, #foreach, #end etc), and if it starts with a $, velocity will see it as a variable to be output (either an actual variable, or the result from running some java). Everything else will come out as it is in the file.

So your line can go anywhere you want it to, but you'll probably want it in a specific place to make the email look nice - probably after, or between, the calls generating the other fields in the output. If in doubt, then simply bung it on the end of the file in your dev system, and then experiment with moving it!

Thanks a lot for elaborating. I'll try the same in dev environment.

Cheers,

Sanu P Soman

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,774 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot