public class TemplateIssue extends Object implements Issue
This class will ensure backwards compatibility for templates accessing the issue object. This class also includes helper methods for retrieving rendered fields (e.g. description, environment) and nicely formatted date fields (e.g. Original Time Estimate, Time Spent, etc.).
This object is passed to the template through the TemplateContext for the velocity email templates
GLOBALID_COMPARATOR| Constructor and Description |
|---|
TemplateIssue(Issue issue,
FieldLayoutManager fieldLayoutManager,
RendererManager rendererManager,
CustomFieldManager customFieldManager,
JiraDurationUtils jiraDurationUtils,
AggregateTimeTrackingCalculatorFactory aggregateTimeTrackingCalculatorFactory) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Version> |
getAffectedVersions() |
Long |
getAggregateOriginalEstimate() |
Long |
getAggregateRemainingEstimate() |
Long |
getAggregateTimeSpent() |
ApplicationUser |
getAssignee()
Returns the Assignee User.
|
String |
getAssigneeId() |
ApplicationUser |
getAssigneeUser()
Returns the Assignee User.
|
Collection<Attachment> |
getAttachments() |
Collection<ProjectComponent> |
getComponentObjects()
Deprecated.
Use
getComponents(). Since v7.0 |
Collection<ProjectComponent> |
getComponents() |
Timestamp |
getCreated() |
ApplicationUser |
getCreator() |
String |
getCreatorId() |
CustomField |
getCustomField(String id) |
Object |
getCustomFieldValue(CustomField customField) |
Object |
getCustomFieldValue(String id)
Get value for a custom field.
|
String |
getDescription()
Retrieve the description of the issue.
|
Timestamp |
getDueDate() |
String |
getEnvironment()
Retrieve the environment of the issue.
|
Long |
getEstimate()
This is the "remaining estimate" of work left to be performed on this issue, in milliseconds.
|
Object |
getExternalFieldValue(String fieldId) |
Collection<Version> |
getFixVersions() |
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Get the backing GenericValue object.
|
String |
getHtmlDescription()
Retrieves the html formatted description.
|
String |
getHtmlEnvironment()
Retrieves the html formatted environment.
|
Long |
getId() |
IssueRenderContext |
getIssueRenderContext() |
IssueType |
getIssueType()
Gets the IssueType for this Issue.
|
String |
getIssueTypeId()
Gets the ID of the IssueType for this Issue.
|
IssueType |
getIssueTypeObject()
Gets the IssueType for this Issue.
|
String |
getKey() |
Set<Label> |
getLabels()
Returns a set of all the labels for this issue or an empty set if none exist yet.
|
Long |
getLong(String name)
Retrieve a numeric field.
|
String |
getNiceTimeAggregateOriginalEstimate(I18nHelper i18n)
Return a formatted time string of the aggregate original time estimate.
|
String |
getNiceTimeAggregateRemainingEstimate(I18nHelper i18n)
Return a formatted time string of the aggregate time estimate.
|
String |
getNiceTimeAggregateTimeSpent(I18nHelper i18n)
Return a formatted time string of the aggregate time spent.
|
String |
getNiceTimeEstimate(I18nHelper i18n)
Return a formatted time string of the time estimate.
|
String |
getNiceTimeOriginalEstimate(I18nHelper i18n)
Return a formatted time string of the original time estimate.
|
String |
getNiceTimeSpent(I18nHelper i18n)
Return a formatted time string of the time spent.
|
Long |
getNumber() |
Long |
getOriginalEstimate()
This is the "original estimate" of work to be performed on this issue, in milliseconds.
|
org.ofbiz.core.entity.GenericValue |
getParent() |
Long |
getParentId() |
Issue |
getParentObject()
If this issue is a subtask, return its parent.
|
Priority |
getPriority()
Returns the Priority for this Issue.
|
Priority |
getPriorityObject()
Returns the Priority for this Issue.
|
org.ofbiz.core.entity.GenericValue |
getProject() |
Long |
getProjectId()
Gets the ID of the Project for this Issue.
|
Project |
getProjectObject()
Gets the Project for this Issue.
|
ApplicationUser |
getReporter()
Returns the Reporter User.
|
String |
getReporterId() |
ApplicationUser |
getReporterUser()
Return the reporter - an object will be returned even if the user has been deleted from the system.
|
Resolution |
getResolution()
Returns the Resolution for this Issue.
|
Timestamp |
getResolutionDate()
Returns the datetime that an issue was resolved on.
|
String |
getResolutionId() |
Resolution |
getResolutionObject()
Returns the Resolution for this Issue.
|
org.ofbiz.core.entity.GenericValue |
getSecurityLevel()
Returns the Security Level for this Issue.
|
Long |
getSecurityLevelId()
Returns the Security Level for this Issue.
|
Status |
getStatus() |
String |
getStatusId() |
Status |
getStatusObject() |
String |
getString(String name)
Retrieve a String field.
|
Collection<Issue> |
getSubTaskObjects()
Gets all the issue's subtasks.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSubTasks() |
String |
getSummary() |
Long |
getTimeSpent()
This is the "total time spent" working on this issue, in milliseconds.
|
Timestamp |
getTimestamp(String name)
Retrieve a timestamp field.
|
Timestamp |
getUpdated() |
Long |
getVotes() |
Long |
getWatches() |
Long |
getWorkflowId() |
boolean |
isAnyAggregateDifferent()
Are any of the aggregates different?
|
boolean |
isCreated() |
boolean |
isEditable() |
boolean |
isSubTask() |
void |
store()
Persist this object's immediate fields.
|
String |
toString() |
public TemplateIssue(Issue issue, FieldLayoutManager fieldLayoutManager, RendererManager rendererManager, CustomFieldManager customFieldManager, JiraDurationUtils jiraDurationUtils, AggregateTimeTrackingCalculatorFactory aggregateTimeTrackingCalculatorFactory)
public Long getId()
public org.ofbiz.core.entity.GenericValue getProject()
getProject in interface Issuepublic Project getProjectObject()
IssuegetProjectObject in interface IssueContextgetProjectObject in interface Issuepublic Long getProjectId()
IssuegetProjectId in interface IssueContextgetProjectId in interface Issuepublic IssueType getIssueType()
IssuegetIssueType in interface IssueContextgetIssueType in interface Issuepublic IssueType getIssueTypeObject()
IssuegetIssueTypeObject in interface IssueContextgetIssueTypeObject in interface Issuepublic String getIssueTypeId()
IssuegetIssueTypeId in interface IssueContextgetIssueTypeId in interface Issuepublic String getSummary()
getSummary in interface Issuepublic ApplicationUser getAssignee()
Issue
Warning: previous incarnations of this method returned com.opensymphony.user.User. This class
has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with
earlier versions.
getAssignee in interface Issuepublic String getAssigneeId()
getAssigneeId in interface Issuepublic ApplicationUser getAssigneeUser()
IssueIf there is no assignee it returns null, else it is guaranteed to return a non-null User. If the User is no longer available, it will create a dummy User object based on the username.
Legacy synonym for Issue.getAssignee()
getAssigneeUser in interface IssueIssue.getAssignee()public Collection<ProjectComponent> getComponentObjects()
getComponents(). Since v7.0getComponentObjects in interface Issuepublic Collection<ProjectComponent> getComponents()
getComponents in interface Issuepublic ApplicationUser getReporter()
Issue
Warning: previous incarnations of this method returned com.opensymphony.user.User. This class
has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with
earlier versions.
getReporter in interface Issuepublic String getReporterId()
getReporterId in interface Issuepublic ApplicationUser getCreator()
getCreator in interface Issuepublic String getCreatorId()
getCreatorId in interface Issuepublic ApplicationUser getReporterUser()
getReporterUser in interface IssueIssue.getReporter()public String getDescription()
getDescription in interface Issuepublic String getHtmlDescription()
A simple string (with linked bug keys displayed) is returned if a rendered version cannot be generated.
public String getEnvironment()
getEnvironment in interface Issuepublic String getHtmlEnvironment()
A simple string (with linked bug keys displayed) is returned if a rendered version cannot be generated.
public Collection<Version> getAffectedVersions()
getAffectedVersions in interface IssueVersion objects.public Collection<Version> getFixVersions()
getFixVersions in interface IssueVersion objects.public Timestamp getDueDate()
getDueDate in interface Issuepublic org.ofbiz.core.entity.GenericValue getSecurityLevel()
IssuegetSecurityLevel in interface Issuepublic Long getSecurityLevelId()
IssuegetSecurityLevelId in interface Issuepublic Priority getPriority()
IssuegetPriority in interface Issuepublic Priority getPriorityObject()
IssuegetPriorityObject in interface Issuepublic String getResolutionId()
getResolutionId in interface Issuepublic Resolution getResolution()
IssuegetResolution in interface Issuepublic Resolution getResolutionObject()
IssuegetResolutionObject in interface Issuepublic String getKey()
public Long getWatches()
getWatches in interface Issuepublic Timestamp getCreated()
getCreated in interface Issuepublic Timestamp getResolutionDate()
IssuegetResolutionDate in interface Issuepublic Timestamp getUpdated()
getUpdated in interface Issuepublic Long getWorkflowId()
getWorkflowId in interface Issuepublic Object getCustomFieldValue(CustomField customField)
getCustomFieldValue in interface IssuecustomField - the CustomFieldpublic CustomField getCustomField(String id)
public Object getCustomFieldValue(String id)
id - Custom field key (eg. 'customfield_10010').public String getStatusId()
getStatusId in interface Issuepublic Status getStatusObject()
getStatusObject in interface Issuepublic Long getOriginalEstimate()
IssuegetOriginalEstimate in interface Issuepublic Long getEstimate()
IssueA better name would be getRemainingEstimate but for historical reasons it is called what it is called.
getEstimate in interface Issuepublic Long getTimeSpent()
IssuegetTimeSpent in interface Issuepublic Long getAggregateOriginalEstimate()
public Long getAggregateRemainingEstimate()
public Long getAggregateTimeSpent()
public Object getExternalFieldValue(String fieldId)
getExternalFieldValue in interface Issuepublic Long getParentId()
getParentId in interface Issuepublic Issue getParentObject()
IssuegetParentObject in interface Issuepublic org.ofbiz.core.entity.GenericValue getParent()
public Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
getSubTasks in interface Issuepublic Collection<Issue> getSubTaskObjects()
IssuegetSubTaskObjects in interface IssueMutableIssuespublic boolean isEditable()
isEditable in interface Issuepublic IssueRenderContext getIssueRenderContext()
getIssueRenderContext in interface Issuepublic Collection<Attachment> getAttachments()
getAttachments in interface IssueAttachment objectspublic String getString(String name)
OfBizValueWrappergetString in interface OfBizValueWrappername - the field namepublic Timestamp getTimestamp(String name)
OfBizValueWrappergetTimestamp in interface OfBizValueWrappername - the field namepublic Set<Label> getLabels()
Issuepublic Long getLong(String name)
OfBizValueWrappergetLong in interface OfBizValueWrappername - the field namepublic org.ofbiz.core.entity.GenericValue getGenericValue()
IssuegetGenericValue in interface IssuegetGenericValue in interface OfBizValueWrapperpublic void store()
OfBizValueWrapper
As of JIRA 7.0 this method is considered optional.
If this object is actually immutable, then it will throw UnsupportedOperationException because there
are no possible mutations to store.
store in interface OfBizValueWrapperpublic String getNiceTimeOriginalEstimate(I18nHelper i18n)
i18n - helper bean for internationalizationpublic String getNiceTimeEstimate(I18nHelper i18n)
i18n - helper bean for internationalizationpublic String getNiceTimeSpent(I18nHelper i18n)
i18n - helper bean for internationalizationpublic boolean isAnyAggregateDifferent()
public String getNiceTimeAggregateOriginalEstimate(I18nHelper i18n)
i18n - helper bean for internationalizationpublic String getNiceTimeAggregateRemainingEstimate(I18nHelper i18n)
i18n - helper bean for internationalizationpublic String getNiceTimeAggregateTimeSpent(I18nHelper i18n)
i18n - helper bean for internationalizationCopyright © 2002-2016 Atlassian. All Rights Reserved.