public abstract class AbstractProgressBarSystemField extends NavigableFieldImpl implements RestAwareField
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractProgressBarSystemField.TimeTrackingParameters |
applicationProperties, templatingEngine
authenticationContext
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH
Constructor and Description |
---|
AbstractProgressBarSystemField(String id,
String nameKey,
String columnHeadingKey,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
static Long |
calculateProgressPercentage(Long spent,
Long remainingEstimate)
Calculates the progress as spent / (spent + remainingEstimate) if parameters are not null.
|
String |
getColumnViewHtml(FieldLayoutItem fieldLayoutItem,
Map displayParams,
Issue issue) |
protected abstract String |
getDisplayId()
Returns the display id which is used by the progress-bar.vm template to generate ids for HTML tags.
|
FieldTypeInfo |
getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
Returns lower level Information about the field.
|
String |
getHiddenFieldId()
Returns the id of the field to check for visibility.
|
FieldJsonRepresentation |
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.
|
JsonType |
getJsonSchema()
Return a description of the shape of this field when represented as JSON.
|
protected abstract AbstractProgressBarSystemField.TimeTrackingParameters |
getTimeTrackingGraphBeanParameters(Issue issue,
I18nHelper helper) |
getApplicationProperties, getColumnCssClass, getColumnHeadingKey, getDefaultSortOrder, getSortComparatorSource, getSortFields, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistory, renderTemplate
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getSorter, prettyPrintChangeHistory
getId, getName, getNameKey
compareTo
public AbstractProgressBarSystemField(String id, String nameKey, String columnHeadingKey, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
public String getHiddenFieldId()
NavigableField
getHiddenFieldId
in interface NavigableField
getHiddenFieldId
in class NavigableFieldImpl
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
getColumnViewHtml
in interface NavigableField
public static Long calculateProgressPercentage(Long spent, Long remainingEstimate)
Throws an IllegalArgumentException if a negative number is passed in.
spent
- time spentremainingEstimate
- remaining estimateprotected abstract AbstractProgressBarSystemField.TimeTrackingParameters getTimeTrackingGraphBeanParameters(Issue issue, I18nHelper helper)
protected abstract String getDisplayId()
public FieldTypeInfo getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
RestAwareField
getFieldTypeInfo
in interface RestAwareField
fieldTypeInfoContext
- the FieldTypeInfoContext
contains context information that is relevant to generate the FieldTypeInfo
public JsonType getJsonSchema()
RestAwareField
getJsonSchema
in interface RestAwareField
public FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequested, @Nullable FieldLayoutItem fieldLayoutItem)
RestAwareField
getJsonFromIssue
in interface RestAwareField
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.Copyright © 2002-2024 Atlassian. All Rights Reserved.