Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Documentation 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 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.

Velocity Context offers many objects for templates. Find the list of variables with explanations here: Customizable Email Templates#VelocityContextforTemplates.

Below is the detailed description of object attributes. You can render the attributes in the templates in the format of $!variable.attribute

User

Attribute NameTypeDescription
userKey

String

Internal key of the user it is unique to the users.
username
StringLoginname of the user
email
StringEmail address of the user

displayName
StringDisplay name of the user
active
booleantrue if the user account is active in Jira
avatar24
avatar32
avatar48
StringURLs to user avatars in different sizes.

Issue

Attributes

Attribute NameTypeDescription
idnumberInternal ID of the issue
keyStringUnique Issue Key
summaryStringIssue summary
descriptionFieldValue<String>Issue Description field with raw value and rendered format
environmentFieldValue<String>Issue Environment field with raw value and rendered format
projectProjectProject of the issue
issueTypeIssueTypeType of the issue
statusStatusIssue status
resolutionResolutionResolution of the issue
priorityPriorityPriority of the issue
timetrackingTimetrackingTimetracking details of the issue
creatorUserCreator of the issue. The Creater may be different from the Reporter as privileged users may create issues on behalf of others.
reporterUserThe user set as Reporter in the issue.
assigneeUserCurrent assignee.
createdFieldValue<Date>Issue Created date field value with raw value and rendered format.
updatedFieldValue<Date>Issue Updated date field value with raw value and rendered format.
resolutionDateFieldValue<Date>Issue Resolution date field value with raw value and rendered format.
dueDateFieldValue<Date>Issue Due Date field value with raw value and rendered format.
customFields

Collection<CustomFieldValue>


comments

Collection<Comment>


attachments

Collection<Attachment>


components

Collection<Component>


fixVersions

Collection<Version>


affectsVersions

Collection<Version>


labels

Collection<String>


Methods

SignatureReturn typeParametersDescriptionExample
getCustomFieldValue(customFieldKey)CustomFieldValue
  • customFieldKey: key of the custom field
Returns a API for Velocity Context Objects#CustomFieldValue object representing the value of the custom field addressed by the key$!issue.getCustomFieldValue('customfield_10116')

IssueEvent

Attribute NameTypeDescription
eventType
EventType
The type of the triggered event.(eg. issue created, issue commented, ...)

issue

API for Velocity Context Objects#IssueThe Issue which the event was fired on.

changelog

API for Velocity Context Objects#Changelog

worklog

API for Velocity Context Objects#Worklog
commentAPI for Velocity Context Objects#Comment
timestampDateThe time when the issue was triggered
userAPI for Velocity Context Objects#UserThe user who triggered the event (added the comment, updated the issue, ...)

Comment

Attribute NameTypeDescription
idNumberInternal ID of the comment
authorUserAuthor of the comment
updateAuthorUserUpdate author of the comment
bodyFieldValue<String>Comment body
createdFieldValue<Date>Creation date
updatedFieldValue<Date>Update date
limitedVisibilityboolean
internalServiceDeskCommentboolean
publicServiceDeskCommentboolean

Changelog

Attribute NameTypeDescription

items

List<API for Velocity Context Objects#ChangelogItem>

A list of Changelog items

ChangelogItem

Attribute NameTypeDescription

created

Date

field

String

fieldId

String

fieldType

String

from

String

fromString

String

to

String

toString

String

Worklog

Attribute NameTypeDescription

author

API for Velocity Context Objects#UserAuthor of the worklog

comment

FieldValue<String>The comment added to the worklog

created

FieldValue<Date>The date when the worklog was created

issueId

longId of the issue

started

FieldValue<Date>

timeSpent

String


timeSpentSeconds

long

visibilityType

String

visibilityValue

String

updateAuthor

API for Velocity Context Objects#User
updatedFieldValue<Date>

EmailCommand

Attribute NameTypeDescription

Template Support

Attribute NameTypeDescription
isAgent($!currentUser, $!issue.project)
isAgent($!currentUser, $!issue.projectObject)
boolean

Returns true if the given user is an agent on the project, otherwise false.

Project

Attribute NameTypeDescription
idLong
nameString
keyString
projectTypeKeyString

IssueType

Attribute NameTypeDescription
idLong
nameString
subtaskboolean
iconUrlString

Status

Attribute NameTypeDescription
idLong
nameString
descriptionString
iconUrlString
categoryKeyString
categoryColorNameString


Priority

Attribute NameTypeDescription
idLong
nameString
descriptionString
iconUrlString

Resolution

Attribute NameTypeDescription
idLong
nameString
descriptionString

Timetracking

Attribute NameTypeDescription

originalEstimate

String
remainingEstimateString
timeSpentString
originalEstimateSecondsLong
remainingEstimateSecondsLong
timeSpentSecondsLong

Attachment

Attribute NameTypeDescription
idLong
contentIdString
filenameString
mimeTypeString
createdDate
sizelong
contentUrlString
thumbnailUrlString
hashString

Component

Attribute NameTypeDescription
idLong
nameString

Version

Attribute NameTypeDescription
idLong
nameString

CustomFieldValue

Attribute NameTypeDescription
customFieldAPI for Velocity Context Objects#CustomFieldReference to the CustomField
renderedValueStringThe value in html as visible in Jira 
valueT

Contains the raw value of the field.

Type is the type of declared in Jira. One of

  • Date
  • String
  • User
  • Collection<User>

CustomField

Attribute NameTypeDescription
customIdLong
key
String

key of the custom field. This is the primary identifier used by Email This Issue. (eg. in macro parameters)

The format is customfield_$id.

itemTypeString
typeString

FieldValue<T>

Attribute NameTypeDescription
rawValueT

Contains the raw value of the field.

Type is the type of declared in Jira. One of

  • Date
  • String
  • User
  • Collection<User>
renderedValueStringThe value in html as visible in Jira 
  • No labels