Versions Compared

Key

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

Redirect
delay3
filename
locationhttps://docs.meta-inf.hu/jeti-cloud/adding-editing-a-mail-handler/email-this-issue-for-jira-cloud-mail-handler-actions

Note
titleDocumentation moved

Thank you for visiting our old product documentation site. Note that we

are in the process of migrating our product documentation and soon we will not

no longer store or update our documentation here.

 

Please navigate to our new documentation site and update your bookmarks accordingly. If you're looking for the former content of this page, click here.

Table of Contents

Actions editor

In the actions editor conditions (IF, ELSE IF, ELSE) and actions (like Create issue, Add comment, Execute transition, Autoreply, etc...) can be added. Conditions and actions can be added under each other and are executed in that order they appear in the list on the left side. 

Whenever you click on a condition or an action, its details will appear on the right side. Any modification to the properties of the action or a condition will appear immediately on the left side.

Actions added below a condition are executed if the given IF or ELSE condition is evaluated to true. There are some special actions, like Set field value that can be added under other actions like Create issue or Execute transition actions. In such cases, these child actions will be executed together with the parent action in a single step. For example, when a new issue is created, fields can be initialized as well, like a single transaction, avoiding to generate a few notification emails about issue updated in that case these actions were executed separately, each in a single step.

To add an action under a condition or another action, hover the mouse and use the plus ( + ) sign on the right to open the pop-up menu:

Image Removed

To add an action or condition at the top level, use the plus ( + ) sign at the bottom of left side list:

Image Removed

This way complex rule and action definitions can be created.

The following is a very simple mail handler:
It checks if issue is not found (by issue keys found in the email's subject) and creates a new Bug issue in SP project. The issue's summary will be the email's subject and the description will contain the email's body.
Else, if the issue was found, then a comment will be added to the existing issue and the comment's content will be the email's body.

Image Removed

Add to Request Participants

This action adds the selected recipients to the Request Participants of the request.

If the customer does not exists, it creates a customer with the email address and adds them as customer to the project, before adding them to the Request Participants. If the customer already exists, but not a customer on the Service Management project, it adds them to the project as customers, then adds them to the Request Participants.

Image Removed

Please note that it does not add the newly created customers as executing user as 72116295 does. To achieve this, first add a "Create customer" action and then an "Add to Request Participants" action with the "To" selected.

Create issue

Use this action to create a new issue in a core/software project or request in a service management. Set at least the Project and Issue/request type.

Split regexp can be used keep only the first part of the body before a pattern that is specified in the regexp. Note that multiple regular expressions can be defined (each on a new line) and they must begin and end with a / sign, like: /Re:/

Note
titleWarning

Please note that during processing before splitting the mail body by regexp, the whole body is converted to Jira wiki format and regexp is applied on the converted value.

for more details please check 72116295

At Attachment handling you can configure when you want to add the attachments to the issue. There are 6 options you can select from:

  • Never add
  • Skip if attachment name matches any of the following regexes
  • Skip if attachment with the same name exists
  • Skip if attachment with the same name and size exists
  • Skip if attachment with the same hash exists
  • Always add
Info

Issue creation is done as well in case the email arrives with an empty body. Description will be left empty, or will be filled with a placeholder, if the field is required on the issue. 

Update issue

This action can be used to update (set field values) an existing issue. Currently it has no parameters, by default it does nothing, add Set field value actions under this action to update multiple fields in a single step.

Suppress Jira's built-in notifications: By default Jira sends a notification about every issue updates. This notification can be suppressed by enabling this option. Please note that to use this option, administer Jira or administer Project permissions are required.

If you try to update an issue with supress Jira's built-in notification without the required permissions, you get an exception saying "To discard the user notification either admin or project admin permissions are required". If you see this error message in the incoming log, either disable the suppress feature, grant permission to the user or use fallback to a default reporter who has the required permission.

Limitations:

  • Due to Jira permission handling a customer cannot update a request even if the reporter is the customer itself. As a solution for this we are planning a feature to select a user for executing Mail Handler: 
    Jira Legacy
    serverSystem JIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId17866d41-eb0b-3831-ab18-06b1f52cba5c
    keyJETIC-754

Set field value

This action sets the value for a specified field.

For all actions you have to select a field, a content and an update mode (append or overwrite). Once the content is selected, further content-specific configuration can be done. The configuration part for the content changes dynamically based on the selection.

Currently supported custom field types are

  • Priority
  • Reporter
  • single and multi user picker custom fields
  • text based custom fields

And currently supported sources are:

  • Participants' email addresses: You can select which participants' email adresses you want to use as a value. Participants can be any of the following: To, From, Cc, Bcc
  • Participants' names: You can select which participants' names you want to use as a value. If the participants don't have a name, their email addresses will be used. Participants can be any of the following: To, From, Cc, Bcc
  • Extract from email: Source is either the subject or the body of the email. You can define a regex and refer to the group which contains the value to set. Group 0 means the whole text.

Image Removed

Note

If you are using the set field value action with the create issue action and you are creating a request, you have to add the field to the Request Type and make it visible on the portal.

Remember, you cannot add an Assignee to the portal, and that's why it cannot be set during request creation. As a work-around, you can create the request, set the fields and in the next action, update the 'Assignee' field.

Note

If you want to add the sender as a Request participant to the request, use the Add sender to request participants action.

Add comment

Split regex can be used to keep only the first part of the body before a pattern that is specified in the regex. Note that multiple regular expressions can be defined (each on a new line) and they must begin and end with a / sign, like: /Re:/

Note
titleWarning

Please note that during processing before splitting the mail body by regex, the whole body is converted to Jira wiki format and the regex is applied on the converted value.

For more details please check 72116295

Visibility allows you to restrict the comment added by the mail handler. The Values are grouped into 3 groups:

  • Service Management allows you to make the comment private
  • Project Roles allows you to restrict comment visibility on Project Roles
  • Groups allow you to restrict comment visibility on Groups

If you don't want to put any restriction on the comment, just set it to 'All users'.

The add comment action has the same Attachment handling strategies as the 72116295 action has.

Info

Comments now can be added to sub-tasks in Service Management projects. The visibility of the comments can be internal, but attachments cannot.

Send auto-reply emails

Use this action to send auto-replies. The same templates can be used that are listed under Outgoing Mails/Templates

Execute workflow transitions

This action can execute transition on the issue. Set the Destination status into which the issue should be moved.

If there are multiple transitions to this destination status, then the preferred one can be chosen in the Use transition field by setting the id or the name of the transition. When the name is specified, then a regexp can be used as well. Note that only one regexp is allowed.

By default, the first found transition is used to move the issue to the required destination status

Note

If you want to execute a transition as a customer on a service management request, don't forget to add that transition to the portal as described here https://support.atlassian.com/jira-service-desk-cloud/docs/show-a-workflow-transition-in-the-portal/

Create customer

This action creates a Service Management Customer with the sender's email address if not existing yet and sets it as executing user. If it already exists, then it will be logged and no customer will be created.

...

.

...

Split regexp

During processing before splitting the mail body by regexp, the whole body is converted to Jira wiki format and regexp is applied on the converted value.

This means that in the case of HTML emails, regexes must be written for wiki format.

Conversion rules:

...

nopaneltrue

...