Package com.atlassian.jira.issue.fields
Class AbstractDurationSystemField
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.NavigableFieldImpl
com.atlassian.jira.issue.fields.AbstractDurationSystemField
- All Implemented Interfaces:
ExportableSystemField,Field,NavigableField,RestAwareField,Comparable
- Direct Known Subclasses:
AbstractAggregateDurationSystemField,OriginalEstimateSystemField,TimeEstimateSystemField,TimeSpentSystemField
public abstract class AbstractDurationSystemField
extends NavigableFieldImpl
implements RestAwareField, ExportableSystemField
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
applicationProperties, templatingEngineFields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContextFields inherited from interface com.atlassian.jira.issue.fields.NavigableField
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDurationSystemField(String id, String nameKey, String columnHeadingKey, String defaultSortOrder, Comparator comparator, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptiongetColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) protected abstract LonggetDuration(Issue issue) getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext) Returns lower level Information about the field.getJsonFromIssue(Issue issue, boolean renderedVersionRequested, FieldLayoutItem fieldLayoutItem) Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.Return a description of the shape of this field when represented as JSON.getRepresentationFromIssue(Issue issue) For the given issue get an exportable representation for the fieldprettyPrintChangeHistory(String changeHistory) prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper) Used for email notification templates - allows changelog to be displayed in language of the recipient.Methods inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
getApplicationProperties, getColumnCssClass, getColumnHeadingKey, getDefaultSortOrder, getHiddenFieldId, getVelocityParams, renderTemplateMethods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKeyMethods inherited from interface com.atlassian.jira.issue.fields.NavigableField
getFieldSorts, getValueLoader, hasSortsDefined, prettyPrintChangeHistory
-
Constructor Details
-
AbstractDurationSystemField
public AbstractDurationSystemField(String id, String nameKey, String columnHeadingKey, String defaultSortOrder, Comparator comparator, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getColumnViewHtml
- Specified by:
getColumnViewHtmlin interfaceNavigableField
-
getDuration
-
prettyPrintChangeHistory
- Specified by:
prettyPrintChangeHistoryin interfaceNavigableField- Overrides:
prettyPrintChangeHistoryin classNavigableFieldImpl
-
prettyPrintChangeHistory
Description copied from interface:NavigableFieldUsed for email notification templates - allows changelog to be displayed in language of the recipient.- Specified by:
prettyPrintChangeHistoryin interfaceNavigableField- Overrides:
prettyPrintChangeHistoryin classNavigableFieldImpl- Parameters:
changeHistory- - label- Returns:
- String change history formatted according to locale in i18nHelper
-
getFieldTypeInfo
Description copied from interface:RestAwareFieldReturns lower level Information about the field. This information contains allowed values and/or the autocomplete url- Specified by:
getFieldTypeInfoin interfaceRestAwareField- Parameters:
fieldTypeInfoContext- theFieldTypeInfoContextcontains context information that is relevant to generate theFieldTypeInfo
-
getJsonSchema
Description copied from interface:RestAwareFieldReturn a description of the shape of this field when represented as JSON.- Specified by:
getJsonSchemain interfaceRestAwareField
-
getJsonFromIssue
public FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequested, @Nullable FieldLayoutItem fieldLayoutItem) Description copied from interface:RestAwareFieldReturn a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.- Specified by:
getJsonFromIssuein interfaceRestAwareField- Parameters:
issue- to get field data fromrenderedVersionRequested- whether the use requested the return of rendered/pretty data as well as raw datafieldLayoutItem- field layout for this field. Will only be supplied if the field is also an ordereable field.- Returns:
- FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.
-
getRepresentationFromIssue
Description copied from interface:ExportableSystemFieldFor the given issue get an exportable representation for the field- Specified by:
getRepresentationFromIssuein interfaceExportableSystemField- Parameters:
issue- to get representation for the field- Returns:
- the fields exportable representation
-