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

Email sending template for incident tickets

Zeeshan Ahmed Khan December 14, 2022

While a user is sending an email to our support email address, Is there a way we can prefill the contents of the email body with a template having field labels like Summary, Description, Urgency etc ?

2 answers

0 votes
Iryna Komarnitska_SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 17, 2023

Hi @Zeeshan Ahmed Khan 

Do you use Gmail?

If yes, then try Email&Tasks: Jira Cloud for Gmail. This app, developed by my team, allows you to convert your emails into tasks in Jira.

The add-on will also pull up your custom fields in your Jira, and you can easily create the necessary task directly from the inbox.

Zeeshan Ahmed Khan March 17, 2023

No, we dont use gmail. Thanks for that.

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2022

Hi @Zeeshan Ahmed Khan 

If a user (I would take that you mean a customer) sends an email to your support (Jira), then this email create a ticket having its subject as a summary and its body and description. The reporter of this ticket will be the sender of the email.

If your question was about to get/extract information from the email body, it is doable via Jira automation, BUT under certain strict conditions (you need to know exactly where to search for the specific information e.g. the urgency is located between the two first special characters of | ).

Now if your question was about you sending a reply to customer with certain information, then this can be done by using again Jira Automation (or another 3rd party app). In that case you need to read this https://support.atlassian.com/cloud-automation/docs/components-in-jira-automation/ and this https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/

Let me know if the above helps.

Zeeshan Ahmed Khan December 15, 2022

Hi @Alex Koxaras _Relational_ , thanks for responding. I would first like to know how to pre-fill the body of the email when someone cliks the <a mailto: support@mycompany.com /a> Link. Something like this:

 

Subject: Help needed 

Body:

*Summary

*Description:

*Urgency:

*Priority:

Impacted Service(s):

User details:

 

If the above is doable then the next step would be to extract that information from the fields and map to the corresponsing issue type fields.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2022

@Zeeshan Ahmed Khan this question of your about prefilling the subject of the email when pressing a link outside of jira, is not a jira related question... You could search stack overflow and google for a solution:

After that you can use smart values text fields, and all the variations of substring() function (substringAfter, substringBetween, substringBefore etc) to get the values you want. Trial and error will get you there.

Zeeshan Ahmed Khan March 14, 2023

Hi @Alex Koxaras _Relational_, I am now at a stage where I would like to extract information from the email received in my Jira service management project and to be populated into my incident ticket. My automation rule looks like this:

Email-Automation-Rule.png

My email template looks like this:

Please complete the following questions to enable us to resolve your incident.
*Name:
*Urgency: High, Medium, or Low:
*Impact: High – System Wide, Medium – Multiple Users, or Low – Single User:

It seems to be working fine with the summary fields' extraction:

{
"fields": {
      "A custom field": "{{issue.summary.substringBetween("*Name: ","*Urg")}}"
              }
}

But is is failing if i try to extract data from the description field like this:

{
"fields": {
      "A custom field": "{{issue.description.substringBetween("*Name: ","*Urg")}}"
              }
}

Error I am getting is: 

Error while parsing additional fields. Not valid JSON.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2023

@Zeeshan Ahmed Khan hi,

Please paste the whole json code.

Zeeshan Ahmed Khan March 15, 2023

Hi @Alex Koxaras _Relational_ , that is my whole code that I have put in my Edit Issue Action as can be seen from the screenshot.

Let me put all the steps in my automation steps here:

Step 1: Rule is triggered when an issue is created

Step 2: I have got the JQL consition as below:

                        request-channel-type = email
Step 3: Then i have got the compare condition as below:

              {{issue.desciption}} contains regular expression \*Name:

Step 4: Then I am doing Edit Action action and have put this code in athe Additional Fields section:

{
"fields": {
       "My custom field": "{{issue.description.substringBetween("*Name: ","*Urg")}}"
            }
}

The above is showing me that JSON is not valid, whereas if i just replace it with

{
"fields": {
       "My custom field": "{{issue.summary.substringBetween("text:","text")}}"
            }
} <-- this works fine

My aim is to extract the text written after *Name: and before *Urgency: from the description (email body). Looks like this:

image.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events