Forums

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

Email notifications based on ticket type

Syed Farath Sayeed April 13, 2018

Hi,

I would like to send notifications based on Issues type. Is it possible?

I would like to have this because I have different screens for different Issues type.

I have used custom fields and have also added some default values to the custom fields, i.e; I have used custom field "Text (Multi lines)". And for the issue type "BUG" I have the following default value:

* Details

* Steps to reproduce

* Comments

And for the issue type "enhancement" I have used the following default value:

* Details:

* Reason:

* Comments

So now I have customized the issuecreated.vm template as:

#if ($issue.getCustomFieldValue("customfield_10300"))
          #rowWrapperNormal("#parse('templates/email/html/includes/fields/custom.vm')")
#end

#if ($issue.getCustomFieldValue("customfield_10500"))
          #rowWrapperNormal("#parse('templates/email/html/includes/fields/custom2.vm')")
#end

With these customization I understand that it will send a notification for every issue created and will include both the fields in the body, as both the fields have some default data. But I would like customize this behavior. So I was thinking to provide "issue type" as parameters for the if statement instead of custom field. But I have no idea how to define issue type field and its value ? Could someone guide me with this please?

 

Thanking you in advance,

SD

 

1 answer

1 accepted

0 votes
Answer accepted
Mirek
Community Champion
April 13, 2018

You can try use this notation

$issuetype.getNameTranslation()

or 

$issue.issueType.name
Syed Farath Sayeed April 13, 2018

@Mirek Thanks it worked.

SD

Tina Advani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2018

Hi, where do you make this entry to get the email notifications? Is this server side or someplace in the Administration?

Syed Farath Sayeed June 7, 2018

@Tina AdvaniI just did it in the installation directory.

Suggest an answer

Log in or Sign up to answer