Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
titleSince version 8.0.0

Next Gen Mail Handlersare a new breed of Handlers that come along with Email This Issue's Mail Account management. It is important that as a first step, you create a Mail Account as this will be needed in a Next Gen mail handler.

Handlers of this type prove to be simpler and more powerful than the Classic Mail Handlers in Email This Issue. They are also future proof, i.e. more development efforts are allocated to add more and more new features to these handlers.

In contrast to the Classic Mail Handlers, this new handler type does not require or use any incoming mail accounts or handlers from Jira's Incoming Mail page. This is a standalone, Email This Issue-only component which makes it separated from limitations or malfunctions Classic handlers inherit from Jira.

Mail handlers can be accessed from the app's administration page. Mail Handlers are displayed separately - Classic Mail Handlers and Next Gen Mail Handlers are shown as follows:

Add or Edit a Next Gen Mail Handler

Next Gen handlers may be added using the + Add button.

in

Handlers are composed of two main sets of attributes:

  • Basic attributes
  • Configurable Handler Actions

Basic Attributes

When you add or edit a handler, the following attributes can be specified as basic attributes:


AttributeDescription
NameUnique name of this handler. 
DescriptionA longer description of the purpose of the handler. Optional.
Mail accounts

Incoming Mail accounts from which the handler receives the incoming emails. 

These accounts are defined in Email This Issue and are independent of the mail accounts defined in Jira.

Next Gen Mail Handlers may be used with multiple mail accounts which makes them ideal to provide a single channel to process emails sent to different mailboxes (you can use more than one email addresses for one project).

Default reporter

The default account used to create issues or requests and add comments when the email sender is not permitted to carry out these operations.

Note
titleRequired Permissions

In order to make the handler fully compatible with Jira Service Management, the default reporter must have Project Administration and Service Management Agent permissions. It is typically achieved by assigning the default reporter to the Administrators and Service Management Team project roles and assigning Service Management application access.

When the handler is configured to work with a non-Service Management project, the default reporter must have Browse Projects, Create Issue, Create Attachments, Add Comment, Manage Watchers, Transition Issues permissions.


DebugIf enabled, the next gen mail handler will generate much more verbose output to the Incoming Mail Log.

Handler Operations

Next Gen mail handlers offer a few operations via the action menu:

OperationDescription
EditEdit the handler's basic attributes
ConfigureConfigure the actions the handler executes when processing an email (see below)
DeleteDelete the handler
Disable / EnableDisable or Enable the handler. Disabled handlers will not process incoming emails.

General Behaviour of Mail Handlers

Mail Handlers (regardless of them being Classic or Next Gen handlers) follow the same scheme of behavior. They process emails in three phases as shown in the diagram below:


Below is a very simple Create or Comment type handler. The sections in the handler correspond to the above-mentioned phases:

Configure a Next Gen Mail Handler

Unlike the Classic Mail Handlers, Next Gen Mail Handlers are not configured via a huge input form crowded with dozens of fields and options, but they are built from small, configurable actions. Each of them performs a very specific operation.

The actions in each section are invoked in the order they are listed. Common operations of each action:

  • Edit: modify the parameters in the actions (not available to all action types)
  • Move up: moves the action up by one position
  • Move down: moves the action down by one position
  • Delete: deletes the action from the handler

Email Filter Actions

Email filter actions check different characteristics of the incoming emails. If an email passes a filter, the next filter is checked. If an email does not pass a filter, then the process stops and the email is marked as filtered out and will not be processed.

There may be multiple filter actions added to a handler. To add a filter action, use the + icon.

Available Email Filter Actions:

FilterDescription
Bulk EmailsFilters out emails with Precedence: bulk header
Delivery Status Notification Emails

Filters out delivery notification emails, which means emails with content type report-type=delivery-status

Auto-submitted Emails

Filters out auto-submitted (auto-replied, auto-generated, auto-notified) emails such as OoO mails.

This includes emails with header Auto-Submitted set to anything else but "no"

Large Emails

Filters out emails larger than a specified size threshold (which is 25MB by default) including attachments.

Emails Sent from This JiraFilters out emails sent from this Jira instance (based on the Jira fingerprint header)
Emails Sent from Other JiraFilters out emails sent from any other Jira instances (based on the Jira fingerprint header)
Emails by Recipient Address

Filters out emails that were not sent to recipients configured in this action. You can specify multiple email addresses or regular expressions that will be matched against the recipients (To, Cc) of the email. Unless either of the recipients matches any of the email addresses or regular expressions, the email is filtered out.

Filter by Sender Address

Filters incoming emails by the senders email address

Filter Name: name of the filter item, you can add more of this filter to the handler with a unique name

Filter by global blacklist: there is a global sender blacklist available in General Configuration, enable this option to use it in this filter

Filter type: if not using the global blacklist, you can specify if this filter accepts or refuses emails sent from addresses matching the regular expressions

Regular expressions: these regexes (Java format, one per line), are matched against the sender's address. If one of the regexes matches, we accept or refuse the email depending on the type being whitelist or blacklist. As a safety measure, please always start your regex with (?i) when matching email addresses.

Emails by email attribute

Status
colourGreen
titleSince version 8.0.3

Filters out emails if the regular expression matches the text in the configured email attribute.
You may define a Template to send a bounce email if this filter rejects the incoming email.

Image RemovedImage Added

  • Email Field: specifies the email attribute that is matched against the regular expression:
    • Subject
    • Body
    • Recipients
    • Senders
    • Email Headers → in this case a new field appears where you can define the Header name.
  • Regular Expression: the expression that matches and extracts content from the email field. As a safety measure, please always start your regex with (?i) when matching email addresses.
  • Template: The selected template to send an automatic bounce email. Only Templates with "Bounce email" category appears in this list.

Find Issues for Emails

This part of the handler contains Issue Lookup Actions whose responsibility is to find issues associated with the email using different approaches. The approaches to find issues associated with emails are:

  • Find issues by the issues key appearing in the email subject
  • Find issues referenced by the In-Reply-To or References headers
  • Find issues by a JQL query composed of the email attributes 

There may be multiple issue lookup actions and they are executed in the order of appearance. If a lookup action finds a single matching issue, the rest of the actions get executed and the issue is later used by the handler.

If the lookup actions do not find any issues or find multiple issues, it is considered as no issues are associated with the email and the email is not processed.

Lookup actions may be added by clicking the + icon.

Available Issue Lookup Actions:

ActionDescription
Find issues by issues key appearing in the email subject

This is the most well-known form of mapping emails to issues. If an issue key appears in the subject, the handler looks up the issue and will use it later on during the process.

If more than one issue keys are included in the subject, they are evaluated from left to right.

Find issues by references in email headersThe handler investigates the In-Reply-To and References email headers. If they refer to an issue, the handler searches for the issue and if found, it will use it later on during the process.
This lookup action can be used to maintain email chains. Please refer to this documentation on how: Maintain Email Chains (Email Threads) in Jira
Find issues by JQL

This lookup action extracts content from the email and executes a JQL query to find the issue:

Image RemovedImage Added

  • Email Field: specifies the email attribute that is matched against the regular expression:
    • Subject
    • Body
    • Recipients
    • Senders
    • Email Headers
  • Regular Expression: the expression that matches and extracts content from the email field. As a safety measure, please always start your regex with (?i) when matching email addresses.
  • JQL: the JQL that is composed of the extracted content referenced by capture groups and locates the issues.

Manipulate Existing Issues

The "Issue found for email" section of the mail handler is composed of actions that are executed if the handler could associate an existing issue with the email that is being processed. Unlike the Filter Emails and Find Issues sections, which include actions of the same kind, this section has a variety of different actions.

Actions may be added by clicking the
  • For example, in the above image, you can see that we check if the incoming email's body matches a regular expression against an issue in which the "External ID" custom field has the regular expression's first capture group ($!group1) as a value. If it only finds one exact match, the issue will be found, if it finds more than one matches, the issue will not be found.

Manipulate Existing Issues

The "Issue found for email" section of the mail handler is composed of actions that are executed if the handler could associate an existing issue with the email that is being processed. Unlike the Filter Emails and Find Issues sections, which include actions of the same kind, this section has a variety of different actions.

Actions may be added by clicking the + icon of the section.

Image RemovedImage Added

The summary of actions to be used here is as follows:

ActionSummary
Add comment to the issueAdds a comment to the issue. 
Update IssueGroups actions setting issue fields
Add extra audit logAdds an additional audit log to the Emails tab.
Execute Workflow TransitionExecutes a workflow transition in the issue's current status
Send Auto-reply emailSends an auto-reply email using a selected template
Save senders and RecipientsSaves email senders and recipients to issue fields
Set FieldSets an arbitrary issue field
ConditionProvides conditional processing

Add comment to the issue

This action adds a comment to an existing issue that is found by the issue lookup commands. The action may be configured based on the below popup dialog:

AttributeDescription
Comment Visibility

Defines the visibility of the comment added by the action.

For Service Management projects, options include:

  • Default: comment will be public if added by a Customer of the request, or by an agent
  • Internal: all comments become internal (comments by customers will be added by the default reporter)
  • Public: all comments will become public (comments by collaborators will be added by the default reporter)
  • Public if customer: only customers comments will be public

For Software and Business projects, a user group or project role may be selected.

Add attachments

Defines how the action handles attachments in the email. Options include:

  • Always add Attachments
  • Do not add Attachments
  • Do not add attachment if one with the same name exists
  • Do not add attachment if one with the same name and size exists
  • Filter attachments using the Attachment Filters
Split RegexThis field may contain Java regular expressions that will be matched against the comment body. If either of the regexes matches the body, the body is split at the match position. The part of the body before the match position will be added as the comment, while the rest is dropped. As a safety measure, please always start your regex with (?i) when matching email addresses.
Default Reporter Comment Event

If a public comment would be added by an external sender it is added by the default reporter in Jira Service Management projects. This setting provides you with a choice to configure how to handle such cases.

  • No event: The comment does not trigger anything in the system. This means that there will be no Service Management events thrown, automations will not be triggered, Email This Issue or Jira Service Management notifications will not be sent, but the SLA remains intact.
  • Email This Issue Event: The comment only sends notifications from the app. This means that there will be no Service Management events thrown (Jira Service Management notifications will not be sent), no automation will be triggered, but Email This Issue notifications will be sent and the SLA remains intact.
  • Service management Event: The comment is added as if it was left by an administrator. This means that Service Management events will be thrown as usual, automations will be triggered as usual, Email This Issue and Jira Service Management notifications will be sent but your SLAs will not work as they should (they will be stopped by the comment even if they should not).
Attach original email as .eml attachmentIf enabled, the original email is attached to the issue as an email file (.eml format).

Update Issue

This action is simply a placeholder of actions that modify the issue fields. It has no attributes to configure. Child actions may be added via the eclipse menu.

Execute Workflow Transition AnchorexecuteTransitionActionexecuteTransitionAction

This action executes a workflow transition on the issue. The transition to execute is either determined by a transition property or by email content. The action may be configured based on the below popup dialog:

Image Removed

AttributeDescriptionSelect transition

Defines how a transition to be executed is selected. There are two options:

  • By a transition property: adding the property jeti.on.email.transition to a transition (with value true) will mark it to be executed. 
  • By email content: if this is selected the email content may determine the transition to execute.
Regular ExpressionA regex that is matched against the selected email field. It may extract part of the content into capture groups. As a safety measure, please always start your regex with (?i) when matching email addresses.Email FieldThe email attribute against which the regex is matched.TransitionName or ID of the transition to execute, it may refer to capture groups of the regex.

Example: execute the transition named in the email body

Image Removed

It is perfectly valid to simply provide the transition name without any email or regex values:

Image Removed

In this case, the transition that is named will be picked for execution.

Note

Workflow Conditions or Workflow Validators may block the transition from being executed but this does not affect the processing of the email.

Send Auto-reply email  AnchorautoreplyActionautoreplyAction

This action sends an auto-reply email back to the email sender using a selected email template. The action may be configured via a popup dialog:

Image Removed

AttributeDescriptionTemplateAn Email This Issue Email Template that is used to generate the auto-reply emails. Auto-reply emails usually acknowledge the successful processing of the emails.From AddressOptionally you can override the From Address set in the auto-reply email. Your SMTP server must accept the specified From Address as valid sender (support relaying).Reply-to AddressOptionally you can specify a reply-to address. Emails as a reply to the auto-reply email will be sent to this addressSave senders and Recipients  AnchorsenderRecipientsActionsenderRecipientsAction

This action saves email senders and recipients into issue fields. The action may be configured via the below popup dialog:

Image RemovedImage Removed

AttributeDescriptionSenders: User w/o permission

Select the issue field to which the sender will be saved if s/he does not have permission to create or access the issue in Jira.

User picker or text fields are available.

Senders Unknown to JiraIf the sender is unknown to Jira (neither a user account nor a customer account exists for the email address), the email address may be saved to a text field. Email addresses saved here may be set as recipients in notifications or manual emails.Recipients: SD Customer

If a recipient email address is recognized as a SD Customer (and the issue is a SD Request), then the customer account will be saved to the selected user picker field. (Default is Request Participants).

Recipients: SD AgentIf a recipient email address is recognized as a SD Agent (and the issue is a SD Request), then the user account will be saved to the selected user picker field. (Default is Watchers).Recipients: User w/ PermissionIf a recipient email address is recognized as a User with permission i.e. Collaborator in SD projects (and the issue is a SD Request), then the user account will be saved to the selected user picker field.Recipients: User w/o PermissionIf a recipient email address is recognized as a User without Permission to view the issue, then it will be saved to a user picker field or his email address is to a text field.Recipients: Unknown to JiraIf the recipient

Add extra audit log

This action adds an additional audit log to the incoming mail log, and the incoming email will be visible on the email's tab.

This option may be used when you would like to update an issue without adding a comment (for example modify a field) but you need it to show in the request (in the email tab).

This action is non-editable, it may only be added or removed from the list of actions.

Image Added

Execute Workflow Transition
Anchor
executeTransitionAction
executeTransitionAction

This action executes a workflow transition on the issue. The transition to execute is either determined by a transition property or by email content. The action may be configured based on the below popup dialog:

Image Added

AttributeDescription
Select transition

Defines how a transition to be executed is selected. There are two options:

  • By a transition property: adding the property jeti.on.email.transition to a transition (with value true) will mark it to be executed. 
  • By email content: if this is selected the email content may determine the transition to execute.
Regular ExpressionA regex that is matched against the selected email field. It may extract part of the content into capture groups. As a safety measure, please always start your regex with (?i) when matching email addresses.
Email FieldThe email attribute against which the regex is matched.
TransitionName or ID of the transition to execute, it may refer to capture groups of the regex.

Example: execute the transition named in the email body

Image Added

It is perfectly valid to simply provide the transition name without any email or regex values:

Image Added

In this case, the transition that is named will be picked for execution.


Note

Workflow Conditions or Workflow Validators may block the transition from being executed but this does not affect the processing of the email.

Send Auto-reply email 
Anchor
autoreplyAction
autoreplyAction

This action sends an auto-reply email back to the email sender using a selected email template. The action may be configured via a popup dialog:


Image Added

AttributeDescription
TemplateAn Email This Issue Email Template that is used to generate the auto-reply emails. Auto-reply emails usually acknowledge the successful processing of the emails.
From AddressOptionally you can override the From Address set in the auto-reply email. Your SMTP server must accept the specified From Address as valid sender (support relaying).
Reply-to AddressOptionally you can specify a reply-to address. Emails as a reply to the auto-reply email will be sent to this address

Save senders and Recipients 
Anchor
senderRecipientsAction
senderRecipientsAction

This action saves email senders and recipients into issue fields. The action may be configured via the below popup dialog:

Image AddedImage Added


AttributeDescription
Senders: User w/o permission

Select the issue field to which the sender will be saved if s/he does not have permission to create or access the issue in Jira.

User picker or text fields are available.

Senders Unknown to JiraIf the sender is unknown to Jira (neither a user account nor a customer account exists for the email address), the email address may be saved to a text field. Email addresses saved here may be set as recipients in notifications or manual emails
Concerning recipients, it is possible to configure from which email field the app should save the recipients to issue
.
Recipients: SD Customer

If a recipient email address is recognized as a SD Customer (and the issue is a SD Request), then the customer account will be saved to the selected user picker field. (Default is Request Participants).

Recipients: SD AgentIf a recipient email address is recognized as a SD Agent (and the issue is a SD Request), then the user account will be saved to the selected user picker field. (Default is Watchers).
Recipients: User w/ PermissionIf a recipient email address is recognized as a User with permission i.e. Collaborator in SD projects (and the issue is a SD Request), then the user account will be saved to the selected user picker field.
Recipients: User w/o PermissionIf a recipient email address is recognized as a User without Permission to view the issue, then it will be saved to a user picker field or his email address is to a text field.
Recipients: Unknown to Jira

If the recipient is unknown to Jira (neither a user account nor a customer account exists for the email address), the email address may be saved to a text field. Email addresses saved here may be set as recipients in notifications or manual emails

Concerning recipients, it is possible to configure from which email field the app should save the recipients to issue fields. Click on the 

Status
colourGreen
titleTO
 and
Status
colourGreen
titleCC
 labels to enable/disable the corresponding email fields. When disabled, they look like: 
Status
colourGrey
titleTO
 and
Status
colourGrey
titleCC
 labels to enable/disable the corresponding email fields. When disabled, they look like:  StatuscolourGreytitleTO and StatuscolourGreytitleCC

Email Address Exclusions

Image Removed

Under the Exclusions tab, regular expressions may be defined. If the email's sender address or recipient addresses match any of these regexes, they are discarded and not saved to issue fields.

This is useful to filter out senders and recipients not matching a certain domain or to prevent saving the mail box email address to issue fields.

Sign-up settings 
Status
colourGreen
titleSince version 8.0.3

Image Removed

In case of Jira Service Management and if the SD is Open for signup, you can define from witch email fields you would like to create a new customer.
If you turn of the creation of new customer, than Mail handler handles the email address as an "Unknown to Jira" address.

Set Field 

Email Address Exclusions

Image Added

Under the Exclusions tab, regular expressions may be defined. If the email's sender address or recipient addresses match any of these regexes, they are discarded and not saved to issue fields.

This is useful to filter out senders and recipients not matching a certain domain or to prevent saving the mail box email address to issue fields.

Sign-up settings 
Status
colourGreen
titleSince version 8.0.3

Image Added

In case of Jira Service Management and if the Service Desk is Open for signup, you can define from which email fields you would like to create a new customer.
If you turn off the creation of new customers, then the Mail handler treats the email address as "Unknown to Jira".

You can also send a signup notification to your new customers, with the Notify newly created customers option. After enabling it you can select a template that will be used to generate the signup notification emails. Note that you can only choose templates here that were created from the Service Desk Customer Invitation theme. In the template, you can use the $!customer.displayName field to refer to the name of the newly created customer (the names of newly created customers are their email addresses). 

Set Issue Fields
Anchor
setFieldAction
setFieldAction

The action sets issue fields from email content. The action may be configured via the below popup dialog:Image Removeddialogs:

Image Added

Image Added

The How to set fields option is a method selector:

MethodDescription
Extract value from emailThis method extracts a value from an email field. This extracted value should be used in the Value field.
Enter value manuallyThis is a manually added value.


AttributeDescription
Issue FieldThe (system or custom) field to be set in the issue.
Regular ExpressionA regex Java regular expression that is matched against the selected email field. It may extract part of the content into capture groups. As a safety measure, please always start your regex with (?i) when matching email addresses.
Email FieldThe email attribute against which the regex is matched.
Value

Manually entered value (e.g. name of a Priority) or reference to the capture groups of the regex. As shown in the example, it follows Velocity Markup syntax therefore it is possible to use #if or other Velocity statements, value transformations.

DefaultIf the value field is blank (no input value, or only spaces), then this value will be the input

of the regex. As shown in the example, it follows Velocity Markup syntax therefore it is possible to use #if or other Velocity statements, value transformations.

DefaultIf the result of the Value attribute is empty or the regular expression does not match the content of the given mail field (for example Value is "Allan the Admin guy" for the CC field but there are no recipients in CC or nobody in the CC field is called "Allan the Admin guy"), the Default attribute will be added as a result. This is a simple text value.

Input helping table for system fields

FieldInputValueValue exampleDescription
Affected versionMultipleVersion number, what existing in the project1.1.1, 1.2.3
AssigneeSingle

username
user key
email address
Full name (if only one user exist with this name)

admin
JIRAUSER10000
admin@my-company.com
John Smith


ComponentMultipleComponent name, what exists in the projectJira, Intranet
DescriptionSingleTextThis is my descriptionIf the length of the description is longer than the maximum length of the description field, the truncate process could cause formatting problems in the formatting.
Due dateSingleA date in this format: yyyyMMdd HH:mm:ss20200506 06:00:00Please use the date parser.
EnvironmentSingleTextMy environmentThis field is truncated if necessary.
Fix versionMultipleVersion number, what existing in the project1.2.3, 1.1.1
Issue securitySingleSecurity level name, what exists in the projectSecurityL1
Issue typeSingleName of the issue type, what exist in the projectTask
LabelsMultipleTextLabel1, Label2If the label does not exists in the issue, JETI creates it.
Original estimateSingleNumber12
PrioritySinglePriority name, what exists in the systemHigh
ProjectSingleProject key, what exists in the systemTESTPThe email sender must have create issue right for this project.
Remaining estimateSingleNumber12
ReporterSingleusername
user key
email address
Full name (if only one user exist with this name)
admin
JIRAUSER10000
admin@my-company.com
John Smith

SummarySingleTextThis is my summaryThis field is truncated if necessary. In this case the maximum length is 255 characters.

Input helping table for custom fields

FieldInputValueValue exampleDescription
Cascade selectSingleJson array of parent and child: ["parent","child"]
Json array with parent element: ["parent"]
Single parent name
["Europe","Hungary"]
["Europe"]
Europe
You can use the cascade parser.
DateSingleA date in this format: yyyyMMdd HH:mm:ss20200506 06:00:00Please use the date parser.
Date timeSingleA date in this format: yyyyMMdd HH:mm:ss20200506 06:00:00Please use the date parser.
Epic linkSingleAn epic issue keyTESTP-12
GroupMultipleGroup names in the systemjira-users, my-group
LabelMultipleTextLabel1, Label2If the label does not exists in the issue, JETI creates it.
Multi selectMultipleFields option namesOption1, Option3
Multi userMultipleusername
user key
email address
Full name (if only one user exist with this name)
admin, user1
JIRAUSER10000, JIRAUSER10001
admin@my-company.com, user1@my-company.com
John Smith, John Doe
The list could be a mix of these values:
admin, JIRAUSER10001, user1@my-company.com
NumberSingleNumber12
SelectSingleOption name, what exists in the fieldEurope
Request typeSingleRequest type in the issueHR request
TextSingleTextMy textSupports single and multi line text fields.
This field is truncated if necessary.
UserSingleusername
user key
email address
Full name (if only one user exist with this name)
admin
JIRAUSER10000
admin@my-company.com
John Smith

Text fields truncate

There is a limitation in Jira for the length of the text fields. Before the Set Field action adds value for text fields, it truncate the text to this maximum length.
The default maximum length of the text fields is 32767 characters.

How to initialize Date and DateTime picker fields

If you want to set Date or DateTime picker fields, date or date-time values from the email must be parsed. Email This Issue provides an object that supports date parsing.

For example:

regexp returns the date string in the first capture group: 23/07/2015. Then set the Value to $parser.parseDate("dd/MM/yyyy", $group1).

The date or date-time pattern follows the syntax in Java SimpleDateFormat.

There is a possibility to set the current timestamp as the target value of any Date or DateTime picker field. To do this, set Value to $parser.now().

Note: the latter feature is also available for text (single line) field assignments. Moreover, in this case the user can specify any valid date/time pattern, how the text shall be written into the field, e.g. by using $parser.now("dd/MM/yyyy"). On the other hand, Date and DateTime picker fields accept data only in a specific format, therefore you do not need to specify any pattern for them. If you still do it, the expression will be automatically overwritten to the parameter-free variant of the parser.

Initialize multi-select fields

In order to save values in multi-select custom fields, the value must be a comma-separated list of literals. Each literal must match a valid option in the field.

e.g. your regex returns the values in groups 1, 2 and 3. Then set the value to $group1, $group2, $group3

Initialize cascading select fields

It is possible to save values in Cascading Select fields. 

If you want to initialize the parent value of a cascading select field, configure the rule with a manual value or with a value from a capture group.

If you want to initialize both the parent and child values, use a special syntax in the Value field: $parser.cascade("<parent-value>", <child-value>").

For example:

  • $parser.cascade($group1, $group2) or
  • $parser.cascade("some value for parent", "some value for child")

Increment or Decrement number fields

If Value is set to a number prefixed with a + or -, and the Issue Field selects a number custom field, the current value of the field will be incremented or decremented respectively, otherwise, the field is set to the value.

E.g if Value is "+2" the field value is incremented by 2.

Mandatory field support

If you have mandatory fields on your create issue screen or on your service management portal, the create issue action shows it on the Mail handler configuration screen:

IconDescription

There is no required field, or all required fields are covered by a Setter action

In case of service management, you can not create request if a field is required on the pdaortal and you don't have a Setter action for that field.

In case of Jira project if any field is required, you don't need to add Setter action

Condition 
Anchor
conditionAction
conditionAction

Conditions allow for conditional processing of emails. This is useful when fields must be set differently depending on some conditions. Conditions may be configured via the below popup dialog:

Image RemovedImage Added

Condition actions provide conditions:

  • on the sender
  • on the issue
  • on the email content


Note

It is not necessary to specify all types of conditions in a Condition action. It is perfectly valid to have any number of combinations. If multiple condition types are provided, they are AND-ed.

A simple JQL condition looks something like this:

Image RemovedImage Added


AttributeDescription
Email Sender is

This is a multi-select dropdown to set conditions on the sender. Options include:

  • External: it means email sender is unknown to Jira
  • Service Management Customer: the sender is a SD customer and the issue is a SD Request
  • Service Management Agent: the sender is a SD Agent in the SD Project
  • User with Permissions (Browse): Sender is a user with Browse permissions to view the issue
  • User without Permissions: Sender is a user without Browse permissions
  • Disabled User: Sender is an inactive user

Since version 8.1.1 it is possible to select Jira User groups as well. Just start typing the name of the groups you want to add and select from the matching groups.

JQLIf specified, the issue is required to match the given JQL to fulfill the Condition
Email FieldEmail Field that is matched against the regex. The condition is met if the email field matches the regex
Regular ExpressionRegular expression to match against the email field. As a safety measure, please always start your regex with (?i) when matching email addresses.

Available Child Actions

Conditions typically have child actions that can be added via the eclipse menu:

Child actions include all the above-mentioned action types, plus two additional ones:

  • Condition
  • Else

Nest Conditions

It is possible to add a condition action within another condition action, therefore nesting conditions into each other:

Else

"If" condition may include an "Else" part, which is executed if the condition is not met. You can add this by selecting Else from the condition's eclipse menu.

Else actions may also have their own child actions and conditions, these may be added via the eclipse menu:

Create a New Issue and Link it to the Existing Issue

Status
colourGreen
titleSince version 8.0.4

The Create Issue action creates a new issue. If added to the section "If Issue found for email", it will create a new issue instead of commenting the existing one. The two issues may be linked using the link type attribute, but this is optional.

This feature is useful e.g. if your processes do not allow commenting on closed issues. In this case, simply add a Condition that checks if the issue which was found for the email is closed, resolved etc. If so, create a new issue, otherwise comment the existing one

Create New Issues

The "Issue not found for email" section of the mail handler is composed of actions that are executed if the handler could not associate an existing issue with the email that is being processed. Unlike the Filter Emails and Find Issues sections, which include actions of the same kind, this section has a variety of different actions.

Actions may be added by clicking the + icon of the section.

Summary of actions to be used here is as follows:

ActionSummary
Create IssueCreates a new issue from the email. 
Execute Workflow Transition

Executes a workflow transition in the issue's current status. 

See documentation above.

Send Auto-reply email

Sends an auto-reply email using a selected template

See documentation above.

Save senders and Recipients

Saves email senders and recipients to issue fields. This action may be added as a child action of the Create Issue Action

See documentation above.

Set Field

Sets an arbitrary issue field. This action may be added as a child action of the Create Issue Action.

See documentation above.

Condition

Provides conditional processing.

See documentation above.

Create Issue Action

This action creates a Service Management request or Jira Issue from the email content. The action may be configured via the popup dialog below:

AttributeDescription
ProjectDefines the project in which the issue will be created. Mandatory field.
Issue TypeDefines the issue type for the new issue. Mandatory field.
Request TypeDefines the Customer Request Type of the new issue. A mandatory field for Service Management projects.
Add attachments

Defines how the action handles attachments in the email. Options include:

  • Add Attachments
  • Do not Add Attachments
  • Do not add attachment if one with the same name exists
  • Do not add attachment if one with the same name and size exists
  • Filter attachments using the Attachment Filters
Split RegexThis field may contain Java regular expressions that will be matched against the comment body. If either of the regexes match the body, the body is split at the match position. The part of the body before the match position will be added as the comment, while the rest is dropped. As a safety measure, please always start your regex with (?i) when matching email addresses.
Attach original email as .eml attachmentIf enabled, the original email is attached to the issue as an email file (.eml format).

Create Service Management Requests

Route Emails to Multiple Projects

By using conditions, you can route incoming emails to multiple projects depending on the email content. Below is an example that creates issues in different projects depending on the recipient address via which the email was received.


Panel
titleOn this page

Table of Contents
maxLevel3