Convert replies to sub task

Introduction

Using the subject field processor and an alias, emails related to a specific issue can be used to create sub-tasks rather than comments. Additionally, using a Notification template, the required alias and Issue Key could be automatically added to JEMHC notifications.

Setup Field Processor and Alias

The Subject Field Processor can be enabled by navigating to JEMHC/Profiles/Profile/Project Mappings/Project Mapping/Field Processor. From here edit the Field processor settings to enable the Subject field processor. This will allow fields in the subject to be extracted and processed.

On the same edit screen, under field processors is the section Directive Aliases. Add a new Alias with the following values:

  • Alias Type = Key

  • Alias = iss

  • Value = parentIssueKey

After creating the Alias the Field Processor screen should look like this:

 

Click Submit to save changes.

Disable Thread Matching

To prevent these emails from being added as comments, Thread Matching for this project will have to be disabled. Thread Matching is used to match issue based on message ID and will match mail in a reply chain. To disable Thread Matching please:

  1. Navigate to JEMHC/Profiles/Profile/Project Mappings/Project Mapping/Pre-Processing

  2. Under Issue Association set Email Threading Enabled to ‘No

Create Template Set

A custom template can be used to automatically add the Alias and issuekey to the subject of JEMHC notifications, resulting in any replies creating a new Sub-task on that issue. For more info see:

Once the template has been created for a ‘Issue Created’ Event, add the following line to the Subject section. This will add the Issue key and Alias to the Subject:

[#iss=$context.issue.key.asText()]

Configure notification mapping

All that remains is to add the template set to the Notification Mapping for the project, for details on creating a Notification Mapping see:

Please:

  1. Navigate to JEMHC/Notifications/Email and edit the Notification Mapping for the project.

  2. Set the Issue Created template to the new template.

To test this configuration, create a new issue and reply to the Issue created notification. This should result in a new Sub-Task being created under the original issue.