Package com.atlassian.jira.issue.fields
Interface NavigableField
- All Superinterfaces:
Comparable
,Field
- All Known Subinterfaces:
AffectedVersionsField
,ComponentsField
,CustomField
,FixVersionsField
,ProjectField
,SummaryField
,TimeSpentField
- All Known Implementing Classes:
AbstractAggregateDurationSystemField
,AbstractDurationSystemField
,AbstractOrderableNavigableFieldImpl
,AbstractPickerFieldImpl
,AbstractProgressBarSystemField
,AbstractTextSystemField
,AbstractUserFieldImpl
,AbstractVersionsSystemField
,AffectedVersionsSystemField
,AggregateEstimateSystemField
,AggregateOriginalEstimateSystemField
,AggregateProgressBarSystemField
,AggregateTimeSpentSystemField
,AssigneeSystemField
,ComponentsSystemField
,CreatedSystemField
,CreatorSystemField
,DescriptionSystemField
,DueDateSystemField
,EnvironmentSystemField
,FixVersionsSystemField
,ImmutableCustomField
,IssueLinksSystemField
,IssueTypeSystemField
,KeySystemField
,LabelsSystemField
,LastViewedSystemField
,MockCustomField
,MockNavigableField
,NavigableFieldImpl
,OriginalEstimateSystemField
,PrioritySystemField
,ProgressBarSystemField
,ProjectSystemField
,ReporterSystemField
,ResolutionDateSystemField
,ResolutionSystemField
,SecurityLevelSystemField
,StatusSystemField
,SubTaskSystemField
,SummarySystemField
,ThumbnailSystemField
,TimeEstimateSystemField
,TimeSpentSystemField
,UpdatedSystemField
,VotesSystemField
,WatchesSystemField
,WorkRatioSystemField
Fields in JIRA which are able to be placed in the Issue Navigator implement this interface.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetColumnViewHtml
(FieldLayoutItem fieldLayoutItem, Map<String, Object> displayParams, Issue issue) The order in which to sort the field when it is sorted for the first time.Returns the id of the field to check for visibility.org.apache.lucene.search.FieldComparatorSource
A sortComparatorSource object to be used for sorting columns in a table.A sorter to be used when sorting columns in a table.List<org.apache.lucene.search.SortField>
getSortFields
(boolean sortOrder) Return a list of Lucene SortFields to be used for sorting search results.prettyPrintChangeHistory
(String changeHistory) prettyPrintChangeHistory
(String changeHistory, I18nHelper i18nHelper) Used for email notification templates - allows changelog to be displayed in language of the recipient.default String
prettyPrintChangeHistory
(String changeHistory, String id, I18nHelper i18nHelper) Used for email notification templates - allows changelog to be displayed in language of the recipient.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKey
-
Field Details
-
TEMPLATE_DIRECTORY_PATH
- See Also:
-
ORDER_ASCENDING
- See Also:
-
ORDER_DESCENDING
- See Also:
-
-
Method Details
-
getColumnHeadingKey
String getColumnHeadingKey() -
getColumnCssClass
String getColumnCssClass() -
getDefaultSortOrder
String getDefaultSortOrder()The order in which to sort the field when it is sorted for the first time.- Returns:
- Either
ORDER_ASCENDING
orORDER_DESCENDING
-
getSortComparatorSource
org.apache.lucene.search.FieldComparatorSource getSortComparatorSource()A sortComparatorSource object to be used for sorting columns in a table. In most cases this will use aMappedSortComparator
using thegetSorter()
method. However, fields can provide any sorting mechanism that they wish.If a field can be sorted directly using terms in the Lucene index then the field should implement
getSortFields(boolean sortOrder)
rather than this method.In large installations custom sorting may incur a maor performance penalty.
- Returns:
- A SortComparatorSource that can be used to sort, or null if this field does not use custom sorting
-
getSortFields
Return a list of Lucene SortFields to be used for sorting search results.Using this method allows the field to specify the most performant way to perform a search. If a field can be sorted directly using the term in the index then this should just return a singleton list with the sort field.
return Collections.singletonList(new SortField(fieldName, sortOrder));
The default implementation builds this using the FieldComparatorSource returned by
getSortComparatorSource()
If you implement this method there is no need to implement
getSortComparatorSource()
.- Returns:
- The name of the indexed term to be used for native Lucene sorting.
-
getSorter
LuceneFieldSorter getSorter()A sorter to be used when sorting columns in a table. This sort uses the Lucene Document Collection and is therefore a lot faster than sorting the issues in memory.- Returns:
- A sorter that can be used to sort this field, or null depending on the value of
getSortComparatorSource()
- See Also:
-
getColumnViewHtml
-
getHiddenFieldId
String getHiddenFieldId()Returns the id of the field to check for visibility. For example, with original estimate field need to ensure that the timetracking field is not hidden. With most fields, this is the same as their id. -
prettyPrintChangeHistory
-
prettyPrintChangeHistory
Used for email notification templates - allows changelog to be displayed in language of the recipient. By default it calls prettyPrintChangeHistory without id argument for backward compatibility.- Parameters:
changeHistory
- - labelid
- - object value- Returns:
- String change history formatted according to locale in i18nHelper
-
prettyPrintChangeHistory
Used for email notification templates - allows changelog to be displayed in language of the recipient.- Parameters:
changeHistory
- - label- Returns:
- String change history formatted according to locale in i18nHelper
-