...
Directives allow emails to direct JEMH on what issue attributes should be used during issue creation or update. Along with Project Mappings, they are one of the main ways to ensure that Jira is given all the information it requires to perform issue creation or modification.
...
Directive key | Example using At Prefix Field Processor (in email body) | Example using Subject Field Processor (in subject) |
---|---|---|
Name or ID of field e.g. |
|
|
Using Directives with different Custom Field Types
When using different field types you must follow the supported format as if a different format is used it will mean that JEMH will not be able to set the value within the Custom Field.
Below are some examples using the At(@) Prefix Field Processor. For more info the At(@) Prefix Field Processor see: JEMH Mail Field Processors
Field Type | Additional information | Example using At Prefix Field Processor (in email body) |
---|---|---|
Checkboxes | Value must already exist as an option within the Custom Field Configuration. |
|
Date Picker | Dates must follow the |
|
Date Time Picker | Date Time values must follow the |
|
Labels | Value does not have to already exist as JEMH can create new labels. |
|
Number Field | Largest value is 100000000000000 |
|
Radio Buttons | Value must already exist as an option with the Custom Field Configuration. |
|
Select List (cascading) | Value must already exist as an option with the Custom Field Configuration. |
|
Select List (Multiple Choice) | Value must already exist as an option |
|
Text Field (multi-line) | Multiple line values can be used with this Custom Field. |
|
Text Field (single line) |
| |
URL Field |
| |
User Picker (single user) |
|
Note |
---|
Note that from JEMH 2.5.1 date values supplied by email directives are locale sensitive. This means that for example, a Jira user who's profile is set to Spanish should send date values such as Prior to 2.5.1, date values should be sent using the system default locale. |
...
Column | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Special ProcessingEvent TypeAs inbound mail can contain a variety of fields, content could trigger any of the stock event templates (e.g. issuecommented.vm). By default the issueupdated.vm template is used. By enabling the following option, the event type will be automatically selected as appropriate. The rule of thumb is that if a single type of information is provided (e.g. a comment, a worklog), that event would be used, combined input will result in a standard IssueUpdated event being used.
Sender Email AddressThe sender email address can be redirected into a nominated Custom Field:
CC:
There are several Options for CC: handling, if enabled, can be:
These options are not mutually exclusive, e.g. ccHandling=toWatcher,toCustomField AttachmentsIf any attachments are present in either initial creation or comments, they will be added to the issue. IssueTypeThe issueType can be determined in several ways:
Field Processors
There are many known keys for emails which are covered on the main add-on page. JEMH has been written with extension and customization in mind. The existing Configuration includes the following Options:
Initial issue creation notifications for allIf the Option notifyUsersOnIssueCreation is set, (values are none,nonjira,jira,all), it is possible to trigger notifications of issue creation, separate to the Jira notification scheme. The purpose of this is to enable users who send email into Jira (when auto-creation is not on, or they don't qualify) to get some kind of notification that the issue got created. This currently only applies to the original email sender. Customisation of from: address for JEMH sourced notificationsThe following options, if either is specified, will override whatever Jira defaults have been setup on the default mail server:
Stripping QuotesThe Option stripQuotes enables inbound emails to be automatically stripped of indented content indicative of the reply-to-jira-mail scenario. This stops ever longer duplicate content additions.
Notify users without eating Jira license seatsA problem with the Jira license model is that sometimes you want to enable customers to send emails to Jira, to create tickets, those users don't need to be able to login to Jira but do need to receive related issue update notifications. JEMH can do this, if you set it up as follows: Gutting the example configuration file does more than just remove fields you don’t care about (right now), it removes the related documentation. My advice is to keep the example, just comment out what you don't need. Required configuration fields
Issue CreationIn order to create issues, that user must have 'Jira User' global privilege, normally this is given to jira-users. In order to create issues you must provide a userid that has such membership, and privileges in the project (perhaps identified through the defaultProject configuration option:
This now enables issues to be created by anyone, but is not attributed to them directly. Creating users without taking Jira seatsIn order to support the notification of users, the approach is to create users without giving them 'Jira User' global privilege. Given that you must provide access to users without knowing their ID, you must also nominate a group, which is likely given 'User' privilege in your project (specifically, the Browse Project permission). The exact nature of the userId is configurable and is extendable, but is not required:
Overall functionWhen the issue has been created, the issue creator is set to the defaultReporterUsername, the remote email user that has been created, is added as a watcher, and will now receive subsequent notifications.
Blocklisting and AllowlistingThere are several reasons you may want to block certain emails, for example:
JEMH provides pretty comprehensive filtering behaviour to nail the annoying emails that you cant get filtered some other way: Allowlisting
Blocklisting
Greylisting
Customizing the Hint/Reject EmailsThe Hints generated during processing are rendered through two sets of template files, HTML and plain text. If an inbound email from: address is found to relate to a Jira user, that users email format preferences are used, plain text otherwise. Hint template filesThe locations of the templates are in the JAR under /templates/email/jemh/html and /templates/email/jemh/text. To customize, just take copies and add to the WEB-INF/classes/templates tree. Hint ID'sSome hints have numeric ID's associate with them to allow custom .vm level content provision over the perhaps verbose techno-babble message. These can be added on request. Trouble ShootingEmail ErrorsFields on long lines are not found or truncated in JiraThis can happen when custom fields or description fields contain more than trivial information, e.g. > ~80 characters:
Problems with WYSIWYG Rendering of description field.See JEMH-55. Workaround for now is use wiki-renderer. Problems with email subject truncation using # character?This is because the SubjectBasedFieldProcessor is trying to process those values. To stop that you can either change the emailFieldProcessorPriorityLowerLimit and emailFieldProcessorPriorityUpperLimit to select the range (only) of processors to employ according to the table below:
If that isn't good enough (or if you just want to reduce 'noise' of handlers that aren't ever going to be used) it's also possible to open the Jar an remove the appropriate class with no side-effects.
Related Articles
|
...