public class TemplateIssue extends GenericIssueWrapper
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
GLOBAL
ID_COMPARATOR
Constructor and Description |
---|
TemplateIssue(Issue issue,
FieldLayoutManager fieldLayoutManager,
RendererManager rendererManager,
CustomFieldManager customFieldManager,
JiraDurationUtils jiraDurationUtils,
AggregateTimeTrackingCalculatorFactory aggregateTimeTrackingCalculatorFactory) |
Modifier and Type | Method and Description |
---|---|
Long |
getAggregateOriginalEstimate() |
Long |
getAggregateRemainingEstimate() |
Long |
getAggregateTimeSpent() |
Object |
getCustomFieldValue(String id)
Get value for a custom field.
|
String |
getHtmlDescription()
Retrieves the html formatted description.
|
String |
getHtmlEnvironment()
Retrieves the html formatted environment.
|
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.
|
boolean |
isAnyAggregateDifferent()
Are any of the aggregates different?
|
void |
store()
Persist this object's immediate fields.
|
String |
toString() |
getAffectedVersions, getArchivedById, getArchivedByUser, getArchivedDate, getAssignee, getAssigneeId, getAssigneeUser, getAttachments, getComponentObjects, getComponents, getCreated, getCreator, getCreatorId, getCustomFieldValue, getDelegate, getDescription, getDueDate, getEnvironment, getEstimate, getExternalFieldValue, getFixVersions, getGenericValue, getId, getIssueRenderContext, getIssueType, getIssueTypeId, getIssueTypeObject, getKey, getLabels, getLong, getNumber, getOriginalEstimate, getParent, getParentId, getParentObject, getPriority, getPriorityObject, getProject, getProjectId, getProjectObject, getReporter, getReporterId, getReporterUser, getResolution, getResolutionDate, getResolutionId, getResolutionObject, getSecurityLevel, getSecurityLevelId, getStatus, getStatusId, getStatusObject, getString, getSubTaskObjects, getSubTasks, getSummary, getTimeSpent, getTimestamp, getUpdated, getVotes, getWatches, getWorkflowId, isArchived, isCreated, isEditable, isSubTask
public TemplateIssue(Issue issue, FieldLayoutManager fieldLayoutManager, RendererManager rendererManager, CustomFieldManager customFieldManager, JiraDurationUtils jiraDurationUtils, AggregateTimeTrackingCalculatorFactory aggregateTimeTrackingCalculatorFactory)
public String getHtmlDescription()
A simple string (with linked bug keys displayed) is returned if a rendered version cannot be generated.
public String getHtmlEnvironment()
A simple string (with linked bug keys displayed) is returned if a rendered version cannot be generated.
public Object getCustomFieldValue(String id)
id
- Custom field key (eg. 'customfield_10010').public Long getAggregateOriginalEstimate()
public Long getAggregateRemainingEstimate()
public Long getAggregateTimeSpent()
public 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 OfBizValueWrapper
store
in class GenericIssueWrapper
public 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-2024 Atlassian. All Rights Reserved.