---
title: "Issue Interface"
canonical: "https://support.appfire.com/space/JMWE/461537734/Issue%20Interface"
format: markdown
---
> Macro (aura-html)

This document details the methods you can use on any `Issue` object, such as the one provided by the `issue`, `linkedIssue` and `parentIssue` variables (where applicable), as well as `Issue` objects returned by other methods such as `getParentObject()`, `getEpic()` or `getLinkedIssues()`.

**Methods of the Issue interface: **

> ⚠️ :green_star: denotes a method that is specific to JMWE

## Methods to access issue fields and information

| Method | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### [get(String fieldNameOrID)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)` `:green_star: | Returns the value of a system or custom field of the Issue object. | A string representing the field name or field Id | `Depends on the field being accessed` |
| #### [get(String fieldNameOrID, Object defaultValue)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/78055905)` `:green_star: | Returns the value of a system or custom field of the Issue object. If the value is null, it returns the default value specified as the second parameter. | 1. A string representing the field name or field Id
2. An object representing the field default value | `Depends on the field being accessed` |
| #### [getAffectedVersions](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getAffectedVersions())`() ` | Returns a** **collection of Affects Version/s objects, an empty collection if there are no affects versions. | None | `<`[Version](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461538137)`>` |
| #### [getAssignee](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getAssignee())`()` | Returns the Assignee user, null if the issue is not assigned. | None | [ApplicationUser](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461472599) |
| #### <span style="color: #333333">[getAsJsonData(String fieldNameOrID)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)</span><span style="color: #333333"> </span>:green_star: | <span style="color: #333333">Returns the JSON-style version of a system or a custom field of the Issue object, essentially a key-value Map. </span><span style="color: #172b4d">This can be useful to access some complex Jira Software and Jira Service desk fields.</span> | A string representing the field name or field Id | [JsonData](https://docs.atlassian.com/software/jira/docs/api/7.5.0/com/atlassian/jira/issue/fields/rest/json/JsonData.html) |
| #### [getAsString(String fieldNameOrID)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)` `:green_star: | Same as the `get` method, but returns a String representation of the value of the system or custom field, whenever possible. | A string representing the field name or field Id |  |
| #### [getAsString(String fieldNameOrID, String defaultValue)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/78055905):green_star: | Same as the `get` method, but returns a String representation of the value of the system or custom field, whenever possible. If the value is null, it returns the default value specified as the second parameter. The `defaultValue `must be a String. | 1. A string representing the field name or field Id
2. A string representing the field default value |  |
| #### [getAttachments](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getAttachments())`()` | Returns a collection of attachment objects, an empty collection if there are no attachments. | None | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[Attachment](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462095169)`>` |
| `getChannel ()` :green_star: | Returns the channel through which the Jira Service Management request was created | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getComponentObjects](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getComponentObjects())`()` | Returns a collection of project components (as objects) that this issue is assigned to,  an empty collection if there are no components. | None | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[ProjectComponent](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462062256)`>` |
| #### [getCreated](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getCreated())`()` | Returns the timestamp of the issue creation. | None | [Timestamp](http://download.oracle.com/javase/6/docs/api/index.html?java/sql/Timestamp.html) |
| #### [getCreator](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getCreator())`()` | Returns the user who created the issue. | None | [ApplicationUser](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461472599) |
| #### [getDescription](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getDescription())`()` | Returns the description of the issue, `null` if there is no description for the issue | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getDueDate](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getDueDate())`()` | Returns the due date of the issue, `null` if there is no due date set for the issue | None | [Timestamp](http://download.oracle.com/javase/6/docs/api/index.html?java/sql/Timestamp.html) |
| #### [getEnvironment](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getEnvironment())`()` | Returns the Environment of the issue, `null` if there is no Environment set for the issue | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getEstimate](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getEstimate())`()` | Returns the "remaining estimate" of work left to be performed on this issue, in milliseconds, `null` if empty. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getFixVersions](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getFixVersions())`()` | Returns a collection of Fix Version/s objects, an empty collection if there are no Fix versions. | None | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[Version](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461538137)`>` |
| #### [getId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getId())`()` | Returns the ID of the issue | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getIssueTypeId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getIssueTypeId())`()` | Returns the ID of the issue type of the issue. | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getIssueType](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getIssueType())`()` | Returns the issue type object of the issue | None | [IssueType](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461407031) |
| #### [getKey](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getKey())`()` | Returns the key of the issue | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getLabels](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getLabels())`()` | Returns the labels of the issue, empty Set if no labels. | None | [Set](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Set.html)`<`[Label](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462160018)`>` |
| #### [getNumber](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getNumber())`()` | Returns the issue number in the project | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getOriginalEstimate](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getOriginalEstimate())`()` | Returns the "original estimate" of work to be performed on this issue, in milliseconds, null if empty. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getPriorityObject](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getPriorityObject())`()` | Returns the Priority for this Issue. | None | [Priority](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462159986) |
| #### [getProjectId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getProjectId())`()` | Returns the ID of the Project for this Issue. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getProjectObject](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getProjectObject())`()` | Returns the Project for this Issue. | None | [Project](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461963993) |
| #### [getRawValue(String fieldNameOrID)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)` `:green_star: | Same as the `get` method, but for Single-Select type custom fields, returns an Option object instead of a String | A string representing the field name or field Id | Depends on the field being accessed |
| #### [getReporter](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getReporter())`()` | Returns the Reporter of the issue | None | [ApplicationUser](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461472599) |
| #### [getResolutionDate](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getResolutionDate())`()` | Returns the timestamp of when an issue was resolved. Will be `null` if it hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state. | None | [Timestamp](http://download.oracle.com/javase/6/docs/api/index.html?java/sql/Timestamp.html) |
| #### [getResolutionId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getResolutionId())`()` | Returns the ID of the resolution of the issue, if any | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getResolution](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getResolution())`()` | Returns the Resolution for this Issue, `null` if the issue hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state. | None | [Resolution](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461406520) |
| #### [getSecurityLevelId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getSecurityLevelId())`()` | Returns the Security level for this issue, `null` if there is no Security level set for the issue | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getStatus](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getStatus())`()` | Returns the status of the issue | None | [Status](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462094606) |
| #### [getSummary](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getSummary())`()` | Returns the summary of the issue | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### [getTimeSpent](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getTimeSpent())`()` | Returns the "total time spent" working on this issue, in milliseconds, `null` if empty. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getUpdated](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getUpdated())`()` | Returns the timestamp of the issue update | None | [Timestamp](http://download.oracle.com/javase/6/docs/api/index.html?java/sql/Timestamp.html) |
| #### [getVotes](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getWatches())`()` | Returns the number of votes for the issue, `null` if empty. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getWatches](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getWatches())`()` | Returns the number of watchers for the issue, `null` if empty. | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [getWorkflowId](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getWorkflowId())`()` | Returns the ID of the workflow the issue belongs to | None | [Long](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Long.html) |
| #### [isCreated](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#isCreated())`()` | Returns true when the issue is created | None | [Boolean](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Boolean.html) |
| #### [isEditable](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#isEditable())`()` | Returns true when the issue is editable | None | [Boolean](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Boolean.html) |
| #### [isSubTask](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#isSubTask())`()` | Returns true when the issue is a sub-task | None | [Boolean](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Boolean.html) |

## Methods to access issue's linked issues

| Method | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### `getEpic() `:green_star: | Returns the Epic, if any, of the current issue. `null` if the issue doesn't belong to an Epic. | None | [Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734) |
| #### `getInwardIssueLinks() `:green_star: | Returns a list of inward issue links to the issue, an empty list if there are no inward issue links. | None | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[IssueLink](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461996485)`>` |
| #### `issue.getIssueLinks()` :green_star: | <span style="color: #000000">Returns a list of issue links from/to the current issue. This can be used to </span><span style="color: #000000">*set*</span><span style="color: #000000"> the Linked Issues field</span> | None | [List](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`<`[IssueLinkWithDirection](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`>` |
| #### `issue.getIssueLinks(String linkType)`<br>:green_star: | <span style="color: #000000">Returns a list of issue links from/to the current issue with a specific link type. This can be used to </span><span style="color: #000000">*set*</span><span style="color: #000000"> the Linked Issues field.</span> | `linkType`:<span style="color: #000000"> The name of a link type, as it appears on the issue view</span> | [List](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`<`[IssueLinkWithDirection](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`>` |
| #### `issue.getIssueLinks(Long linkTypeId, String direction) `:green_star: | <span style="color: #000000">Returns a list of issue links from/to the current issue with a specific link type and direction. This can be used to </span><span style="color: #000000">*set*</span><span style="color: #000000"> the Linked Issues field.</span> | `linkTypeId`:<span style="color: #000000"> A number representing the link type </span><span style="color: #000000">*id *</span><span style="color: #000000">(e.g. 10300 ).</span><br>`direction`<span style="color: #000000">: The link type direction (outward or inward)</span> | [List](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`<`[IssueLinkWithDirection](https://jira8-jira8-rvijji.media.innovalog.com/secure/admin/workflows/AddWorkflowTransitionFunctionParams!default.jspa?workflowName=TES%3A+Task+Management+Workflow&workflowMode=draft&descriptorTab=postfunctions&workflowStep=1&workflowTransition=21&pluginModuleKey=com.innovalog.jmwe.jira-misc-workflow-extensions%3AClearFieldValueOfLinkedIssues-function&atl_token=BVL3-7MVB-FIHJ-R2P6_1927059740a67d723bd5053b4381fbedd4aac03c_lin)`>` |
| #### `getLinkedIssues() `:green_star: | Returns a list of issues linked to the current issue (including the issue links <span style="color: #172b4d">being added on the transition screen during a transition)</span> through any regular link type.<br>:warning: **Note:** Supports all issue links other than Parent-Subtask (see `getParentObject()` and `getSubTaskObjects()` for that), Epic-Story (see`getEpic()`and`getStories()`for that) and Parent-Child portfolio (see `getPortfolioParent() and getPortfolioChildIssues() `for that) | None | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |
| #### `getLinkedIssues(String linkType) `:green_star: | Returns a list of issues linked to the current issue (including the issue links <span style="color: #172b4d">being added on the transition screen during a transition)</span> through a specific link type. | `linkType: `A string representing  t<span style="color: #000000">he name of a link type, as it appears on the issue</span>view <span style="color: #000000">(e.g. blocks or is blocked by)</span>. | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |
| #### `getLinkedIssues(Long linkTypeId, String direction) `:green_star: | Returns a  list of issues linked to the current issue (including the issue links being added on the transition screen during a transition) through the specified link type Id and direction.<br>**For example:** `getLinkedIssues(10301, “inward”)` returns issues linked inward to the current issue through the link type with Id `10301`. | `linkTypeID`: A number representing the link type *id *(e.g. 10300 ).<br>`direction`:  The link type direction (outward or inward) | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |
| #### `getOutwardIssueLinks()` :green_star: | Returns a list of outward issue links from the issue, an empty list if there are no outward issue links. | None | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[IssueLink](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461996485)`>` |
| #### [getParentObject](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getParentObject())`()` | Returns the parent Issue, or null if the issue is not a subtask. | None | [Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734) |
| #### `getPortfolioChildIssues()`:green_star: | Returns a list of issues linked to the current issue through the "is parent of (Portfolio child Issues)" link type | None | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |
| #### `getPortfolioParent()`:green_star: | Returns the issue linked to the current issue through the "is child of (Portfolio Parent Link)", or `null` if the issue is not a child. | None | [Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734) |
| #### [getRemoteLinks(String ApplicationName)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)` `:green_star: | Returns a <span style="color: #000000">collection of remote issue links of the current issue to the target application (e.g. "jira" or "confluence"). When the </span>`ApplicationName`<span style="color: #000000"> is null all the remote issue links are returned.</span> | `applicationName: `A string representing t<span style="color: #000000">he remote link application name of a link type, as it appears on the Application Links page</span> | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[RemoteIssueLink](https://appfire.atlassian.net/wiki/x/wwmnB)`>` |
| #### `getStories() `:green_star: | Returns a list of stories of the current Epic, an empty list if there are no Stories | None | [List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |
| #### [getSubTaskObjects](https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/issue/Issue.html#getSubTaskObjects())`()` | Returns the subtasks of this issue, an empty collection if no subtasks | None | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[Issue](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537734)`>` |

## Methods to link issues

| Method | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### `linkIssue(String linkType, Issue destIssue) `:green_star: | <span style="color: #000000">Links the current issue to the specified issue through the specified link type direction</span> | `linkType`: A string representing  t<span style="color: #000000">he name of a link type, as it appears on the issue</span><span style="color: #cccccc"> </span>view <span style="color: #000000">(e.g. blocks or is blocked by)</span>.<br>`destIssue: `<span style="color: #000000">The issue to link to.</span> | `void` |
| #### `linkIssue(String linkType, String destIssueKey) `:green_star: | <span style="color: #000000">Links the current issue to the issue with the specified issue key through the specified link type direction</span> | `linkType`: A string representing  t<span style="color: #000000">he name of a link type, as it appears on the issue</span><span style="color: #cccccc"> </span>view <span style="color: #000000">(e.g. blocks or is blocked by)</span>.<br>`destIssue: `<span style="color: #091e42">A string representing t</span><span style="color: #000000">he key of the issue to link to.</span> | `void` |
| #### `linkIssue(Long linkTypeID, String direction, Issue destIssue) `:green_star: | <span style="color: #172b4d">Links the current issue to the specified issue through the specified link type id and direction.</span> | `linkTypeID`: A number representing the link type *id *(e.g. 10300 ).<br>`direction`:  The link type direction (outward or inward)<br>`destIssue`: The issue object to link to. | `void` |
| #### `linkIssue(Long linkTypeID, String direction, Issue destIssueKey) `:green_star: | <span style="color: #172b4d">Links the current issue to the issue with the specified issue key through the specified link type id and direction.</span> | `linkTypeID`: A number representing the link type *id *(e.g. 10300 ).<br>`direction`: The link type direction (outward or inward)<br>`destIssueKey`: The key of the issue to link to. | `void` |

## Methods to set issue field value

| Method | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### [setFieldValue(String fieldNameOrId, Object value)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462128154)` `:green_star: | Sets the value of a system or custom field of the Issue object<br>> ⚠️ Use this method only in the Scripted Groovy operation post-function or in the Groovy console or in the Shared Groovy scripts.
> ⚠️ 
> ⚠️ Use the "Set field of new issue" and "Transition screen" sections of the Create issue and Transition post-functions respectively to set field values. | `fieldNameOrId`: A string representing the <span style="color: #000000">name or ID of a standard or custom field</span><br>`Object value: `<span style="color: #000000">The value to set the field to.</span> | `void` |

## Methods to access issue properties

| Method | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### `deleteEntityProperty(String propertyName) `:green_star: | <span style="color: #091e42">Deletes the specified Entity property of the issue.</span> | `propertyName`: A string representing the name of the Entity Property | `void` |
| #### `getEntityProperty(String propertyName) `:green_star: | <span style="color: #091e42">The value of the specified Entity property of the issue, parsed into a Groovy object.</span> | A string representing the name of a property | [Object](https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html) |
| #### `setEntityProperty(String propertyName, Object value) `:green_star: | <span style="color: #091e42">Sets the value of the specified Entity property of the issue to a JSON representation of the specified value.</span> | `propertyName`: A string representing the name of the Entity Property<br>`Object value: `<span style="color: #000000">The value to set the field to.</span> | `void` |
| #### `setEntityPropertyToJsonString(String propertyName, String jsonString) `:green_star: | <span style="color: #091e42">Sets the value of the specified Entity property of the issue to the specified JSON string.</span> | `propertyName`: A string representing the name of the Entity Property<br>`jsonString: `<span style="color: #000000">A String representing the</span> JSON string value to set. | `void` |

## Methods to display message on issue view

#### `showMessageToUser(String type, Boolean autoClose, String title, String body)`** **:green_star:** **

**Description**

Displays a message to the user, in the form of a "flag" in the top right corner of the screen. :warning: Testing this in the Groovy tester will not display the flag.

**Parameters**

| **Parameter name** | **Type** | **Description** | **Example** |
| --- | --- | --- | --- |
| `type` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The type of message to display: info, success, warning or error. Controls the color of the message box. | - info
- success
- warning
- error |
| `autoClose` | [Boolean](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Boolean.html) | Whether the message box should close automatically after a few seconds. | - true
- false |
| `title` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The title of the message | Sample title |
| `body` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The body of the message. Can contain HTML markup | - Sample body
- “<b>Warning to the admins</b>” |

**Return type**

void

**Examples**

#### `showMessageToUser(String type, String title, String body, String actionName, String actionType, String actionParam, Boolean inNewWindow) `:green_star:

**Description**

Displays a message to the user, in the form of a "flag" in the top right corner of the screen. The message will include an *action link* which, when clicked, will navigate to either a Jira issue or an arbitrary web page. :warning: Testing this in the Groovy tester will not display the flag.

**Parameters**

| **Parameter name** | **Type** | **Description** | **Example** |
| --- | --- | --- | --- |
| `type` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The type of message to display: info, success, warning or error. Controls the color of the message box. | - info
- success
- warning
- error |
| `title` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The title of the message | Sample title |
| `body` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The body of the message. Can contain HTML markup | Sample body |
| `actionName` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The title of the action link | Go to issue |
| `actionType` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | The type of action to perform when the user clicks on the link. Can be GOTO_ISSUE to navigate to a Jira issue, or GOTO_URL to navigate to an arbitrary web page. | - GOTO_ISSUE
- GOTO_URL |
| `actionParam` | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) | Either an issue key (for the GOTO_ISSUE action type) or a URL (for the GOTO_URL action type) | - TEST-123
- [https://www.innovalog.com/](https://www.innovalog.com/) |
| `inNewWindow` | [Boolean](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Boolean.html) | Whether to open the issue or web page in a new browser window/tab. | - true
- false |

**Return type**

void

**Examples**

## Other methods

| `Method` | Description | Parameters | Return type |
| --- | --- | --- | --- |
| #### `addAvailableOption(String fieldNameorID, String value) `:green_star: | <span style="color: #091e42">Adds the provided value as a new possible option to the mentioned field.</span><br>> ⚠️ <span style="color: #000000">Only applies to fields that have a fixed list of possible values, such as Affects Version/s, Fix Version/s, Components, Radio buttons, Checkboxes, Single select and Multi-select list type custom fields.</span> | `fieldNameOrId`: A string representing the <span style="color: #000000">name or ID of a standard or custom field</span><br>`value: `<span style="color: #000000">The value to set the field to.</span> | `void` |
| #### `addRemoteLink(`[RemoteIssueLink](https://appfire.atlassian.net/wiki/x/wwmnB)` remoteIssueLink) `:green_star: | <span style="color: #172b4d">Adds a remote issue link to the issue.</span> | A `RemoteIssueLink `object representing the remote issue link<br>**For example:** `issue.getRemoteLinks("<ApplicationLinkName>")` | `void` |
| #### [getAvailableOptions(String fieldNameOrID)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461997007)` `:green_star: | Returns a collection of available options for a field, which can be:<br>- a [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[Option](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462160057)`>` for select-type fields
- a [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[Version](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461538137)`>` for version-type fields
- a [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<`[ProjectComponent](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/462062256)`>` for the components field
- etc.<br>Both field names and field IDs are supported, just like on the get() method. See [here](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461997007) for the list of supported fields. | A string representing the field name or field Id | [Collection](http://download.oracle.com/javase/6/docs/api/index.html?java/util/Collection.html)`<Object the field returns>` |
| #### [getFieldHistory(](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)<span style="color: #333333">[String fieldNameOrID](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)</span>[)](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461537562)` `:green_star: | `Returns the history of a system or custom field of the Issue object.` | A string representing the field name or field Id | <span style="color: #172b4d">[List](http://docs.oracle.com/javase/7/docs/api/java/util/List.html)</span>`<`<span style="color: #172b4d">[ChangeItemBean](https://appfire.atlassian.net/wiki/spaces/JMWE/pages/461767899)</span>`>` |
| #### `getModifiedFields()` | <span style="color: #474747">Retrieves a map of issue fields that have been modified during the current transition.</span> | None | [Map](http://download.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true)`<`[String](http://download.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true)`,`[ModifiedValue](https://docs.atlassian.com/software/jira/docs/api/7.2.2/com/atlassian/jira/issue/ModifiedValue.html)`>` |
| #### `getServiceDeskUrl()` :green_star: | Returns the URL of the issue's customer request view.  Only applies to Service Desk requests. Returns `null` otherwise. | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |
| #### `getUrl()` :green_star: | Returns the URL of the issue's View screen. | None | [String](http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html) |