# API for Velocity Context Objects

Velocity Context offers many objects for templates. Find the list of variables with explanations here: [Customizable Email Templates#VelocityContextforTemplates](/email-this-issue/outgoing-emails/email-this-issue-for-jira-cloud-customizable-email-templates.md#CustomizableEmailTemplates-VelocityContextforTemplates).

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

* [User](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-User)
* [Issue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Issue)
  * [Attributes](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Attributes)
  * [Methods](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Methods)
* [IssueEvent](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-IssueEvent)
* [Comment](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Comment)
* [Changelog](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Changelog)
* [ChangelogItem](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-ChangelogItem)
* [Worklog](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Worklog)
* [EmailCommand](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-EmailCommand)
* [Template Support](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-TemplateSupport)
* [Project](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Project)
* [IssueType](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-IssueType)
* [Status](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Status)
* [Priority](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Priority)
* [Resolution](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Resolution)
* [Timetracking](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Timetracking)
* [Attachment](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Attachment)
* [Component](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Component)
* [Version](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-Version)
* [CustomFieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-CustomFieldValue)
* [CustomField](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md#APIforVelocityContextObjects-CustomField)
* [FieldValue\<T>](https://docs.meta-inf.hu/email-this-issue/general/email-this-issue-for-jira-cloud-api/pages/-Mf8I45nAd0RK3tyURW4#APIforVelocityContextObjects-FieldValue%3CT%3E)

## User <a href="#apiforvelocitycontextobjects-user" id="apiforvelocitycontextobjects-user"></a>

| Attribute Name | Type    | Description                                         |
| -------------- | ------- | --------------------------------------------------- |
|                | String  | Internal key of the user it is unique to the users. |
|                | String  | Loginname of the user                               |
|                | String  | Email address of the user                           |
|                | String  | Display name of the user                            |
|                | boolean | true if the user account is active in Jira          |
|                | String  | URLs to user avatars in different sizes.            |

## Issue <a href="#apiforvelocitycontextobjects-issue" id="apiforvelocitycontextobjects-issue"></a>

### Attributes <a href="#apiforvelocitycontextobjects-attributes" id="apiforvelocitycontextobjects-attributes"></a>

| Attribute Name  | Type                                                                                                                                                                                                                                   | Description                                                                                                                     |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| id              | number                                                                                                                                                                                                                                 | Internal ID of the issue                                                                                                        |
| key             | String                                                                                                                                                                                                                                 | Unique Issue Key                                                                                                                |
| summary         | String                                                                                                                                                                                                                                 | Issue summary                                                                                                                   |
| description     | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<String>                                                                               | Issue Description field with raw value and rendered format                                                                      |
| environment     | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<String>                                                                               | Issue Environment field with raw value and rendered format                                                                      |
| project         | [Project](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Project)                                                                                                      | Project of the issue                                                                                                            |
| issueType       | [IssueType](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-IssueType)                                                                                                  | Type of the issue                                                                                                               |
| status          | [Status](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Status)                                                                                                        | Issue status                                                                                                                    |
| resolution      | [Resolution](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Resolution)                                                                                                | Resolution of the issue                                                                                                         |
| priority        | [Priority](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Priority)                                                                                                    | Priority of the issue                                                                                                           |
| timetracking    | [Timetracking](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Timetracking)                                                                                            | Timetracking details of the issue                                                                                               |
| creator         | [User](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-User)                                                                                                            | Creator of the issue. The Creater may be different from the Reporter as privileged users may create issues on behalf of others. |
| reporter        | [User](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-User)                                                                                                            | The user set as Reporter in the issue.                                                                                          |
| assignee        | [User](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-User)                                                                                                            | Current assignee.                                                                                                               |
| created         | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>                                                                                 | Issue Created date field value with raw value and rendered format.                                                              |
| updated         | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>                                                                                 | Issue Updated date field value with raw value and rendered format.                                                              |
| resolutionDate  | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>                                                                                 | Issue Resolution date field value with raw value and rendered format.                                                           |
| dueDate         | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>                                                                                 | Issue Due Date field value with raw value and rendered format.                                                                  |
| customFields    | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[CustomFieldValue](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-CustomFieldValue)> |                                                                                                                                 |
| comments        | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[Comment](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Comment)>                   |                                                                                                                                 |
| attachments     | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[Attachment](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Attachment)>             |                                                                                                                                 |
| components      | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[Component](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Component)>               |                                                                                                                                 |
| fixVersions     | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[Version](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Version)>                   |                                                                                                                                 |
| affectsVersions | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)<[Version](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-Version)>                   |                                                                                                                                 |
| labels          | [Collection](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html)\<String>                                                                                                                                             |                                                                                                                                 |

### Methods <a href="#apiforvelocitycontextobjects-methods" id="apiforvelocitycontextobjects-methods"></a>

| Signature                           | Return type                                                                                                                                         | Parameters                                                | Description                                                                                                                                                                                                                                                      | Example                                           |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| getCustomFieldValue(customFieldKey) | [CustomFieldValue](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-CustomFieldValue) | <ul><li>customFieldKey: key of the custom field</li></ul> | Returns a [API for Velocity Context Objects#CustomFieldValue](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-CustomFieldValue) object representing the value of the custom field addressed by the key | $!issue.getCustomFieldValue('customfield\_10116') |

## IssueEvent <a href="#apiforvelocitycontextobjects-issueevent" id="apiforvelocitycontextobjects-issueevent"></a>

| Attribute Name | Type                                                                                                                                                              | Description                                                                  |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| eventType      |                                                                                                                                                                   | The type of the triggered event.(eg. issue created, issue commented, ...)    |
| issue          | [API for Velocity Context Objects#Issue](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-Issue)         | The Issue which the event was fired on.                                      |
| changelog      | [API for Velocity Context Objects#Changelog](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-Changelog) |                                                                              |
| worklog        | [API for Velocity Context Objects#Worklog](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-Worklog)     |                                                                              |
| comment        | [API for Velocity Context Objects#Comment](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-Comment)     |                                                                              |
| timestamp      | Date                                                                                                                                                              | The time when the issue was triggered                                        |
| user           | [API for Velocity Context Objects#User](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-User)           | The user who triggered the event (added the comment, updated the issue, ...) |

## Comment <a href="#apiforvelocitycontextobjects-comment" id="apiforvelocitycontextobjects-comment"></a>

| Attribute Name             | Type                                                                                                                                                     | Description                  |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| id                         | Number                                                                                                                                                   | Internal ID of the comment   |
| author                     | [User](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-User)                              | Author of the comment        |
| updateAuthor               | [User](https://metainf.atlassian.net/wiki/display/JETIC/API+for+Velocity+Context+Objects#APIforVelocityContextObjects-User)                              | Update author of the comment |
| body                       | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<String> | Comment body                 |
| created                    | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>   | Creation date                |
| updated                    | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>   | Update date                  |
| limitedVisibility          | boolean                                                                                                                                                  |                              |
| internalServiceDeskComment | boolean                                                                                                                                                  |                              |
| publicServiceDeskComment   | boolean                                                                                                                                                  |                              |

## Changelog <a href="#apiforvelocitycontextobjects-changelog" id="apiforvelocitycontextobjects-changelog"></a>

| Attribute Name | Type                                                                                                                                                                            | Description               |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| items          | List<[API for Velocity Context Objects#ChangelogItem](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-ChangelogItem)> | A list of Changelog items |

## ChangelogItem <a href="#apiforvelocitycontextobjects-changelogitem" id="apiforvelocitycontextobjects-changelogitem"></a>

| Attribute Name | Type | Description |
| -------------- | ---- | ----------- |
| created        |      |             |
| field          |      |             |
| fieldId        |      |             |
| fieldType      |      |             |
| from           |      |             |
| fromString     |      |             |
| to             |      |             |
| toString       |      |             |

## Worklog <a href="#apiforvelocitycontextobjects-worklog" id="apiforvelocitycontextobjects-worklog"></a>

| Attribute Name   | Type                                                                                                                                                     | Description                           |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| author           | [API for Velocity Context Objects#User](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-User)  | Author of the worklog                 |
| comment          | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<String> | The comment added to the worklog      |
| created          | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>   | The date when the worklog was created |
| issueId          | long                                                                                                                                                     | Id of the issue                       |
| started          | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>   |                                       |
| timeSpent        | String                                                                                                                                                   |                                       |
| timeSpentSeconds | long                                                                                                                                                     |                                       |
| visibilityType   | String                                                                                                                                                   |                                       |
| visibilityValue  | String                                                                                                                                                   |                                       |
| updateAuthor     | [API for Velocity Context Objects#User](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-User)  |                                       |
| updated          | [FieldValue](/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md)\<Date>   |                                       |

## EmailCommand <a href="#apiforvelocitycontextobjects-emailcommand" id="apiforvelocitycontextobjects-emailcommand"></a>

| Attribute Name | Type | Description |
| -------------- | ---- | ----------- |

## Template Support <a href="#apiforvelocitycontextobjects-templatesupport" id="apiforvelocitycontextobjects-templatesupport"></a>

| Attribute Name | Type    | Description                                                                 |
| -------------- | ------- | --------------------------------------------------------------------------- |
|                | boolean | Returns true if the given user is an agent on the project, otherwise false. |

## Project <a href="#apiforvelocitycontextobjects-project" id="apiforvelocitycontextobjects-project"></a>

| Attribute Name | Type | Description |
| -------------- | ---- | ----------- |

## IssueType <a href="#apiforvelocitycontextobjects-issuetype" id="apiforvelocitycontextobjects-issuetype"></a>

## Status <a href="#apiforvelocitycontextobjects-status" id="apiforvelocitycontextobjects-status"></a>

## Priority <a href="#apiforvelocitycontextobjects-priority" id="apiforvelocitycontextobjects-priority"></a>

## Resolution <a href="#apiforvelocitycontextobjects-resolution" id="apiforvelocitycontextobjects-resolution"></a>

## Timetracking <a href="#apiforvelocitycontextobjects-timetracking" id="apiforvelocitycontextobjects-timetracking"></a>

## Attachment <a href="#apiforvelocitycontextobjects-attachment" id="apiforvelocitycontextobjects-attachment"></a>

## Component <a href="#apiforvelocitycontextobjects-component" id="apiforvelocitycontextobjects-component"></a>

## Version <a href="#apiforvelocitycontextobjects-version" id="apiforvelocitycontextobjects-version"></a>

## CustomFieldValue <a href="#apiforvelocitycontextobjects-customfieldvalue" id="apiforvelocitycontextobjects-customfieldvalue"></a>

| Attribute Name | Type                                                                                                                                                                  | Description                                                                                                                                                                |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customField    | [API for Velocity Context Objects#CustomField](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-CustomField) | Reference to the CustomField                                                                                                                                               |
| renderedValue  | String                                                                                                                                                                | The value in html as visible in Jira                                                                                                                                       |
| value          | T                                                                                                                                                                     | <p>Contains the raw value of the field.</p><p>Type is the type of declared in Jira. One of</p><ul><li>Date</li><li>String</li><li>User</li><li>Collection\<User></li></ul> |

## CustomField <a href="#apiforvelocitycontextobjects-customfield" id="apiforvelocitycontextobjects-customfield"></a>

| Attribute Name | Type                                                                                                                          | Description                                                                                                                                              |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customId       | [L](https://metainf.atlassian.net/wiki/pages/resumedraft.action?draftId=49512456#APIforVelocityContextObjects-CustomField)ong |                                                                                                                                                          |
|                | String                                                                                                                        | <p>key of the custom field. This is the primary identifier used by Email This Issue. (eg. in macro parameters)</p><p>The format is customfield\_$id.</p> |
| itemType       | String                                                                                                                        |                                                                                                                                                          |
| type           | String                                                                                                                        |                                                                                                                                                          |

## FieldValue\<T> <a href="#apiforvelocitycontextobjects-fieldvalue-less-than-t-greater-than" id="apiforvelocitycontextobjects-fieldvalue-less-than-t-greater-than"></a>

| Attribute Name | Type   | Description                                                                                                                                                                |
| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| rawValue       | T      | <p>Contains the raw value of the field.</p><p>Type is the type of declared in Jira. One of</p><ul><li>Date</li><li>String</li><li>User</li><li>Collection\<User></li></ul> |
| renderedValue  | String | The value in html as visible in Jira                                                                                                                                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meta-inf.hu/email-this-issue/general/email-this-issue-for-jira-cloud-api/email-this-issue-for-jira-cloud-api-for-velocity-context-objects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
