Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Issue interface

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 JMCF

On this page:

Getters

MethodReturn typeReturns
get(String fieldNameOrID) (green star)Depends on the field being accessedThe value of a system or custom field of the Issue object.
get(String fieldNameOrID, Object defaultValue) (green star)Depends on the field being accessedThe 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. 

getAffectedVersions()

Collection<Version>

A collection of Affects Version/s objects, an empty collection if there are no affects versions.

getAssignee()

ApplicationUser

The Assignee user, null if the issue is not assigned.
getAsString(String fieldNameOrID) (green star)StringSame as the get method, but returns a String representation of the value of the system or custom field, whenever possible.
getAsString(String fieldNameOrID, String defaultValue)(green star)StringSame 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.
getAsJsonData(String fieldNameOrID) (green star)JsonDataThe JSON-style version of a system or a custom field of the Issue object, essentially a key-value MapThis can be useful to access some complex Jira Software and Jira Service desk fields.

getAttachments()

Collection<Attachment>

A collection of attachment objects, an empty collection if there are no attachments.

getAvailableOptions(String fieldNameOrID) (green star)

Collection<Object the field returns>

The Collection of available options for a field, which can be:

Both field names and field IDs are supported, just like on the get() method. See here for the list of supported fields.

getComponentObjects()

Collection<ProjectComponent>

A collection of project components (as objects) that this issue is assigned to, an empty collection if there are no components.

getCreated()

TimestampThe timestamp of the issue creation.

getCreator()

ApplicationUserThe user who created the issue.

getDescription()

StringThe description of the issue, null if there is no description for the issue

getDueDate()

TimestampThe due date of the issue, null if there is no due date set for the issue
getEntityProperty(String propertyName) (green star)ObjectThe value of the specified Entity property of the issue, parsed into a Groovy object.

getEnvironment()

StringThe Environment of the issue, null if there is no Environment set for the issue
getEpic() (green star)
IssueThe Epic, if any, of the current issue. null if the issue doesn't belong to an Epic.

getEstimate()

Long

The "remaining estimate" of work left to be performed on this issue, in milliseconds, null if empty.

getFieldHistory(String fieldNameOrID) (green star)List<ChangeItemBean>The history of a system or custom field of the Issue object.

getFixVersions()

Collection<Version>

A collection of Fix Version/s objects, an empty collection if there are no Fix versions.

getId()

LongThe ID of the issue
getInwardIssueLinks() (green star)List<IssueLink>A list of inward issue links to the issue, an empty list if there are no inward issue links.

getIssueTypeId()

StringThe ID of the issue type of the issue.

getIssueType()

IssueTypeThe issue type object of the issue

getKey()

StringThe key of the issue

getLabels()

Set<Label>The labels of the issue, empty Set if no labels.
getLinkedIssues(String linkType) (green star)List<Issue>

A list of issues linked to the current issue (including the issue links being added on the transition screen during a transition) through a specific link type.

(warning) Note: Supports all issue links other than Parent-Subtask (see getParentObject() and getSubTaskObjects() for that), Epic-Story (seegetEpic()andgetStories()for that) and Parent-Child portfolio (see getPortfolioParent() and getPortfolioChildIssues() for that)

getLinkedIssues() (green star)List<Issue>

A list of issues linked to the current issue (including the issue links being added on the transition screen during a transition) through any regular link type.

(warning) Note: Supports all issue links other than Parent-Subtask (see getParentObject() and getSubTaskObjects() for that), Epic-Story (seegetEpic()andgetStories()for that) and Parent-Child portfolio (see getPortfolioParent() and getPortfolioChildIssues() for that)

getModifiedFields()Map<String,ModifiedValue>Retrieve a map of issue fields that have been modified during the current transition.

getNumber()

LongThe issue number in the project

getOriginalEstimate()

LongThe "original estimate" of work to be performed on this issue, in milliseconds, null if empty.
getOutwardIssueLinks() (green star)List<IssueLink>A list of outward issue links from the issue, an empty list if there are no outward issue links.

getParentObject()

Issue

The parent Issue, or null if the issue is not a subtask.

getPortfolioChildIssues()(green star)List<Issue>A list of issues linked to the current issue through the "is parent of (Portfolio child Issues)" link type
getPortfolioParent()(green star)IssueThe issue linked to the current issue through the "is child of (Portfolio Parent Link)", or null if the issue is not a child.

getPriorityObject()

Priority

The Priority for this Issue.

getProjectId()

Long

The ID of the Project for this Issue.

getProjectObject()

Project

The Project for this Issue.

getRawValue(String fieldNameOrID) (green star)Depends on the field being accessedSame as the get method, but for Single-Select type custom fields, returns an Option object instead of a String
getRemoteLinks(String ApplicationName) (green star)Collection<RemoteIssueLink>A collection of remote issue links of the current issue to the target application (e.g. "jira" or "confluence"). When the ApplicationName is null all the remote issue links are returned.

getReporter()

ApplicationUserThe Reporter of the issue

getResolutionDate()

Timestamp

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.

getResolutionId()

StringThe ID of the resolution of the issue, if any

getResolution()

Resolution

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.

getSecurityLevelId()

LongThe Security level for this issue, null if there is no Security level set for the issue
getServiceDeskUrl() (green star)StringThe URL of the issue's customer request view.  Only applies to Service Desk requests. Returns null otherwise.

getStatus()

StatusThe status of the issue
getStories() (green star)
List<Issue>A list of stories of the current Epic, an empty list if there are no Stories

getSubTaskObjects()

Collection<Issue>

The subtasks of this issue, an empty collection if no subtasks

getSummary()

StringThe summary of the issue

getTimeSpent()

Long

The "total time spent" working on this issue, in milliseconds, null if empty.

getUpdated()

TimestampThe timestamp of the issue update
getUserProperty(String propertyName) (green star)String

Returns the value of the specified User property of the user.

This method returns User Properties that are defined on the Edit User Properties Jira admin page. which are different from the Entity Properties that can only be set and read programmatically (see the Set/Get/DeleteEntityProperty methods)

getUrl() (green star)StringThe URL of the issue's View screen.

getVotes()

LongThe number of votes for the issue, null if empty.

getWatches()

LongThe number of watchers for the issue, null if empty.

getWorkflowId()

LongThe ID of the workflow the issue belongs to

isCreated()

Boolean
True when the issue is created

isEditable()

Boolean
True when the issue is editable

isSubTask()

Boolean
True when the issue is a sub-task

Setters

MethodParametersDescription
setEntityProperty(String propertyName, Object value) (green star)

propertyName: A string representing the name of the Entity Property

Object value: The value to set the field to.

Sets the value of the specified Entity property of the issue to a JSON representation of the specified value.
setEntityPropertyToJsonString(String propertyName, String jsonString) (green star)

propertyName: A string representing the name of the Entity Property

jsonString: A String representing the JSON string value to set.

Sets the value of the specified Entity property of the issue to the specified JSON string.
setFieldValue(String fieldNameOrId, Object value) (green star)

fieldNameOrId: A string representing the name or ID of a standard or custom field

Object value: The value to set the field to.

Sets the value of a system or custom field of the Issue object

Others

MethodParametersDescription
deleteEntityProperty(String propertyName) (green star)propertyName: A string representing the name of the Entity PropertyDeletes the specified Entity property of the issue.
addAvailableOption(String fieldNameorID, String value) (green star)

fieldNameOrId: A string representing the name or ID of a standard or custom field

value: The value to set the field to.

Adds the provided value as a new possible option to the mentioned field.

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.

linkIssue(String linkTypeDirection, Issue destIssue) (green star)

linkTypeDirection: A string representing  the link type direction (e.g. blocks or is blocked by).

destIssue: The issue to link to.

Links the current issue to the specified issue through the specified link type direction
linkIssue(String linkTypeDirection, String destIssueKey) (green star)

linkTypeDirection: A string representing  the link type direction (e.g. blocks or is blocked by).

destIssue:  A string representing the key of the issue to link to.

Links the current issue to the issue with the specified issue key through the specified link type direction