/
Directives

Directives

What are Directives?

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.

By default, Jira requires at least a project, reporter and assignee to be defined. Additional fields may also have been made required for creation of issues. Directives allow this information to be specified by users.

Remember to enable Directive Processing Behaviour under Profile>Directives, if you wish to make use of email-based directives.

Field Processors

Directives in an email are found by Field Processors that are currently enabled in a profile. When an email is processed, each enabled field processor looks for directives. The one that finds the most is used for that email.

Security and global settings

The intention in JEMH is that the Jira security model is followed, and that Global Settings are adhered to.  For example, you will not be able to comment on an issue if the reporter does not have comment permission. Similarly you won't be able to add an Attachment if Attachments are disabled via profile configuration.

Directives are flexible

  • Directive keys and values are not case sensitive, for example "bug" and "Bug" are both acceptable

  • If a value is a JIRA constant (issue type, priority etc.) then either its ID or name will work

Issue fields

Project

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

project

@project = support

#project=support

Reporter

Allows overriding the reporter that would be determined via profile configuration for the email. The value must identify an actual user by their username, and not their email address.

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

reporter

@reporter = auser

#reporter=auser

Assignee

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

assignee

@assignee = auser

#assignee=auser

Issue Type

The value can either be a name or ID number.

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

issueType

@issueType = bug

#issueType=risk

Priority

The value can either be a name or ID number.

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

priority

@priority = critical

#priority=1

Components

The value can either be a name or ID number.

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

components

@components = Component One,Component Two

#components=12345

Watchers

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

watchers

@watchers = auser

#watchers=auser,buser,cuser

Due date

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 3/ene/19 instead of 3/jan/19. In earlier versions date values should be sent using the system default locale.

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

Directive key

Example using At Prefix Field Processor (in email body)

Example using Subject Field Processor (in subject)

dueDate

@dueDate = 1-May-2009

#dueDate=1-May-2009

The due date value format must match one of the following:

  • Format specified through the dueDateFormat directive (e.g. dd-MMM-yyyy, see SimpleDateFormat).

  • Jira system date format setting jira.date.picker.java.format found via Jira Administration > System > General configuration > Advanced Settings.

Due date format

Used in combination with the due date directive. This is only required if using a format other than the Jira system format (see due date section for more information).