Supported fields for use with Directives

Jira Core

The intention is to be able to set anything on a JIRA Issue. Comments and attachments are implicitly supported during issue creation and comment.

 

Multiple values are typically support with CSV, e.g. @key=Value1,Value2,Value3

Field

Description/notes

Use in create

Use in comment

Field

Description/notes

Use in create

Use in comment

custom-field

Custom fields can be manipulated in two ways:

  • The custom field name. If values for fields can be represented as a string. Tested with Labels, e.g. "Labels: sentByEmail". Note to be careful naming custom fields with default field names, for example assignee is a default field.

  • Custom field ids can be used as per example:

    • customfields_<customfield id>

project

numeric (e.g. 10001), textual name (e.g. Support) or project key (e.g. SPP). Only required if email to: address is not a known project key

priority

numeric (e.g. 4) or text name (e.g. critical)

issueType

numeric (e.g. 12) or text name (e.g. Feature Request)

issueType.status since 3.3.56

Requires an issueType directive to be defined.

numeric (e.g. 6) or text name (e.g. Closed)

It’s possible to migrate an existing Issue Type with a status when this directive is used in conjunction with the issueType directive.

For example (in the @ prefix field processor):
@issueType=Task
@issueType.status=Closed

Status migration will only be processed during commenting. If an invalid status is found or issue failed to transition to the supplied Status value; then issue will proceed as original issue type and workflow state.

components

A CSV capable field. Can be numeric (e.g. 100020) or textual name (e.g. My Magic Component)

viewable

String value matching a group or role name, used to restrict the visibility of comments

environment

String

reporter

userid or email address of given user in JIRA

assignee

userid or email address of given user in JIRA, who is 'assignable'

summary

String (single line)

description

String (multiple lines)

watchers

Comma Separated Variable list of userid's, in Jira

dueDate

Users can override the default (ISO standard) SimpleDateFormat string yyyy-MM-ddTHH:mm:ssZ through the 'dueDateFormat' field (e.g. dd-MMM-yyyy enables dates like 12-May-2009.  If the user does not provide a dueDateFormat directive, the system default (in jira-application.properties) under the key jira.date.picker.java.format will be used as a fallback

workEstimate

of format 1w7d12h30m, or any derivative JIRA 6 requires spaces between values. When supplied in the subject it needs quoting like: #workEstimate="1w 2d 3h"

linkto

Issue Linking more information on Issue Links here: https://confluence.atlassian.com/adminjiraserver/configuring-issue-linking-938847862.html ,

Format

Legend

  • direction type = to/from

  • destinationIssue = issue you want the property to apply to

  • sourceIssue = issue being processed

  • linkTypeProperty = outward/inward/name value

directionType:destinationIssue/linkTypeProperty

Examples

to

to:ABC-101/duplicate

from

from:XYZ-123/relates

to+from

to:ABC-101/duplicate,from:XYZ-123/relates

multiple links

to:ABC-101/duplicate,from:XYZ-123/relates,from:XYZ-124/is blocked by,to:XYZ-125/blocks

 

fixVersions

1.3,2.1

affectsVersions

1.0,1.1,2.0

vote

true (only value to make sense/false)

securityLevel

Long value, e.g. 12345.

Jira Software

Field

Description/Notes

Use in Create

Use in Comment

Field

Description/Notes

Use in Create

Use in Comment

epic name

Required when creating an issue of type "Epic"

epic link

Required in order to link an issue to a parent Epic.  The value used is the name of the epic you are linking it to.

epic colour

The colour pre-set used for the Epic.  The values are ghx-label-1 to ghx-label-9.

Jira Service Management

Field

Description

Create

Comment

Field

Description

Create

Comment

organizations

Sets the Organizations field on requests. The value can be either the ID or name of one or more Organizations. Multiple values should be comma separated.

internalComment

Used to set whether a comment is internal (private, not seen by customers) or not.  Can only be used by Agent users. Value is boolean (true or false).

Other

Field

Description

Use in create

Use in comment

Field

Description

Use in create

Use in comment

issueKey

this Directive can identify an issue directly, e.g. with a value of ABC-123. Alternatively, it is also possible for this to be a simple assertion for a custom field value, e.g.: with a value of Custom Field X=123456789 a JQL search will be triggered for issues containing that value. The first found will be commented upon.

Sub-tasks

Issues can be created nominating a parent issue such that they become a child of that issue. Restrictions are that they get created in the same project. Its possible to set components if required.

Field

Description/notes

Use in create

Use in comment

Field

Description/notes

Use in create

Use in comment

parentIssueKey

value indicates issue to create new task under PROJ-123, currently only 'Sub-task' is supported

Issue Templates

Issues can be created that refer to another, from which most properties will be taken on 'template' style. In addition, that template issues description can use a special markup %comment% that will be replaced by the incoming email body part, allowing nested content to be generated. An example would be issueTemplate=ABC-123. Whilst this structure will work fine in body Directives, it will not work in the Subject, as it will be found by Jira for commenting purposes. The workaround is to use Aliases, which may be a better all-round solution, as it then isolates the issue used as a template from people using it, for example, a range of aliases could be set-up, such as @support, @defect, @documentation etc.

Field

Description

Use in create

Use in comment

Field

Description

Use in create

Use in comment

issueTemplate

uses fields from the given issue during issue creation, allowing defaulted custom field values and more

Example Description of a template issue, showing how to get incoming description injected:

This is an example message... *Thanks for the comment:* {quote} %comment% {quote} Thanks for calling...

Workflow

The following directives can be used to transition through an issues workflow.

Field

Description/notes

Use in create

Use in comment

Field

Description/notes

Use in create

Use in comment

workflow

value indicates the workflow step, can be exact text match or first word match (see FAQ), e.g. start would match 'Start Progress'

workflow.<parameter>

keys with suffixes of workflow. are interpreted as parameters to the given workflow transition, otherwise defaults will be used (see FAQ). For example, workflow.resolution with a value of cancelled

Example of workflow manipulation with the @ Prefix Field Processor

MIME-Version: 1.0 Received: by 10.223.112.12 with HTTP; Sat, 18 Jun 2012 22:42:26 -0700 (PDT) Date: Sun, 19 Jan 2016 17:42:26 +1200 Message-ID: <BANLkTinB8fd7nfdsp7dBoQ@mail.gmail.com> Subject: ISSUE-5 From: user@company.com To: jira-mail@company.com Content-Type: text/plain; charset=UTF-8 @workflow=close @workflow.resolution=done

Work Logs

It is possible to add work logs, update time remaining and set work log visibility. Keys are case-insensitive.

Field

Description/notes

Use in create

Use in comment

Field

Description/notes

Use in create

Use in comment

wl.timeSpent

Sets logged work duration to be set in normal 3h 45m type format (It is important there is a space between each time unit)

wl.startDate

Set logged work start date in system default date format (TODO link to Jira property)

wl.newEstimate

Sets the new estimate of effort for the work, value format 1d3h25m

wl.keepEstimate

If set true will keep the existing estimate unmodified, when logging timeSpent

wl.viewable.role

Enables Project Role visibility restrictions for work logs to be set, Name or ID can be used

wl.viewable.group

Enables visibility restrictions for work logs to be set (NOTE: must be enabled through jira-application.properties), Name or ID can be used

 

Attachments

All attachments are automatically added to created issues in either create or comment mode.

Custom Fields

Simple custom fields just need to be picked out by name as a key, e.g. Date Time: 28/Jan/09 08:00 am. The value is the text->object encoding supported by the Custom Field.

Field Extensions

Field

Description/notes

Use in create

Use in comment

Field

Description/notes

Use in create

Use in comment

ccHandling

values are toWatcher and toCustomField. toWatcher makes cc: resolvable users watchers, toCustomField routes resolvable users to a nominated Custom Field, set by ccHandlingTargetCustomFieldName

ccHandlingTargetCustomFieldName

Defines the name or ID of a Custom Field that will have cc: resolvable users added to

ccusers

This field can be used in addition to the standard email cc:, it is a CSV formatted value, identifying users by ID/email. The provided values are processed according to system configuration values ccHandling and ccHandlingTargetCustomFieldName