public class AffectedVersionsSystemField extends AbstractVersionsSystemField implements AffectedVersionsField, RestFieldOperations
Modifier and Type | Field and Description |
---|---|
static String |
CHANGE_ITEM_FIELD |
RELEASED_VERSION_ID, searchLinkGenerator, UNKNOWN_VERSION_ID, UNRELEASED_VERSION_ID, versionHelperBean, versionManager
authenticationContext
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH
Constructor and Description |
---|
AffectedVersionsSystemField(VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
VersionManager versionManager,
PermissionManager permissionManager,
JiraAuthenticationContext authenticationContext,
RaisedInVersionStatisticsMapper raisedInVersionStatsMapper,
VersionHelperBean versionHelperBean,
AffectedVersionSearchHandlerFactory searchHandlerFactory,
JiraBaseUrls jiraBaseUrls,
SearchLinkGenerator searchLinkGenerator,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFieldRequiredErrorMessage(Issue issue,
ErrorCollection errorCollection,
I18nHelper i18n) |
boolean |
canRemoveValueFromIssueObject(Issue issue)
Returns
true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value. |
protected String |
getArchivedVersionsFieldSearchParam() |
protected String |
getArchivedVersionsFieldTitle() |
protected String |
getChangeItemFieldName() |
String |
getColumnHeadingKey() |
protected Collection<Version> |
getCurrentVersions(Issue issue) |
Collection<Version> |
getDefaultValue(Issue issue)
The value that should be set on the issue if the field is not shown for some reason.
|
protected String |
getIssueRelationName() |
JsonData |
getJsonDefaultValue(IssueContext issueCtx)
Return The default data for this system field.
|
protected String |
getModifiedWithoutPermissionErrorMessage(I18nHelper i18n) |
RestFieldOperationsHandler |
getRestFieldOperation() |
LuceneFieldSorter |
getSorter()
A sorter to be used when sorting columns in a table.
|
protected boolean |
getUnreleasedVersionsFirst() |
boolean |
isShown(Issue issue)
Tests field specific way to determine if it should be shown or not.
|
void |
removeValueFromIssueObject(MutableIssue issue)
Removes the field value from the given MutableIssue object.
|
void |
updateIssue(FieldLayoutItem fieldLayoutItem,
MutableIssue issue,
Map fieldValueHolder)
Record the value on the issue (not saving it to the database, see updateValue).
|
protected List<ChangeItemBean> |
updateIssueValue(Issue issue,
Collection<Version> newValue) |
addViewVelocityParams, availableForBulkEdit, createValue, getBulkEditHtml, getColumnViewHtml, getCreateHtml, getCurrentVersionIds, getDefaultSortOrder, getEditHtml, getFieldTypeInfo, getJsonFromIssue, getJsonSchema, getPossibleVersions, getRelevantParams, getRepresentationFromIssue, getValueFromParams, getVersionManager, getViewHtml, getViewHtml, hasValue, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, updateValue, validateParams
getColumnCssClass, getHiddenFieldId, getSortComparatorSource, getSortFields, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistory
createAssociatedSearchHandler, getApplicationProperties, getCreateHtml, getEditHtml, getFieldLayoutItemForBulkOperation, getIssueForBulkOperation, getPermissionManager, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasParam, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, validateBulkEditHtmlProperties, valuesEqual
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getColumnCssClass, getColumnViewHtml, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getSortFields, prettyPrintChangeHistory, prettyPrintChangeHistory
availableForBulkEdit, createValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasParam, hasValue, needsMove, populateDefaults, populateForMove, populateFromIssue, populateFromParams, populateParamsFromString, updateValue, validateParams
createAssociatedSearchHandler
getId, getName, getNameKey
compareTo
public static final String CHANGE_ITEM_FIELD
public AffectedVersionsSystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, VersionManager versionManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, RaisedInVersionStatisticsMapper raisedInVersionStatsMapper, VersionHelperBean versionHelperBean, AffectedVersionSearchHandlerFactory searchHandlerFactory, JiraBaseUrls jiraBaseUrls, SearchLinkGenerator searchLinkGenerator, com.atlassian.event.api.EventPublisher eventPublisher)
public boolean isShown(Issue issue)
OrderableField
isShown
in interface OrderableField<Collection<Version>>
issue
- The Issue.protected Collection<Version> getCurrentVersions(Issue issue)
getCurrentVersions
in class AbstractVersionsSystemField
protected String getArchivedVersionsFieldTitle()
getArchivedVersionsFieldTitle
in class AbstractVersionsSystemField
protected String getArchivedVersionsFieldSearchParam()
getArchivedVersionsFieldSearchParam
in class AbstractVersionsSystemField
protected boolean getUnreleasedVersionsFirst()
getUnreleasedVersionsFirst
in class AbstractVersionsSystemField
protected void addFieldRequiredErrorMessage(Issue issue, ErrorCollection errorCollection, I18nHelper i18n)
addFieldRequiredErrorMessage
in class AbstractVersionsSystemField
public String getColumnHeadingKey()
getColumnHeadingKey
in interface NavigableField
public LuceneFieldSorter getSorter()
NavigableField
getSorter
in interface NavigableField
NavigableField.getSortComparatorSource()
DocumentIssueImpl
,
MappedSortComparator
protected String getIssueRelationName()
getIssueRelationName
in class AbstractVersionsSystemField
protected String getChangeItemFieldName()
getChangeItemFieldName
in class AbstractVersionsSystemField
protected List<ChangeItemBean> updateIssueValue(Issue issue, Collection<Version> newValue)
updateIssueValue
in class AbstractVersionsSystemField
protected String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
getModifiedWithoutPermissionErrorMessage
in class AbstractVersionsSystemField
public Collection<Version> getDefaultValue(Issue issue)
OrderableField
For example: The user does not have permission to see the field, or the field is not part of the create screen.
getDefaultValue
in interface OrderableField<Collection<Version>>
getDefaultValue
in class AbstractVersionsSystemField
issue
- the Issue.public void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)
OrderableField
updateIssue
in interface OrderableField<Collection<Version>>
fieldLayoutItem
- FieldLayoutItemissue
- MutableIssuefieldValueHolder
- Field Value Holder MapOrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)
public void removeValueFromIssueObject(MutableIssue issue)
OrderableField
Note that this operation does not actually persist the change, it just clears the value from the given Issue object. The caller will still need to call #updateValue() in order to persist the change.
Some Fields may choose to quietly ignore this request. eg The SecurityLevel Field will not remove Security Level from subtasks because the subtask must always take the Security Level of its parent issue.
removeValueFromIssueObject
in interface OrderableField<Collection<Version>>
issue
- The issue object to be effected.OrderableField.canRemoveValueFromIssueObject(com.atlassian.jira.issue.Issue)
,
OrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)
public boolean canRemoveValueFromIssueObject(Issue issue)
OrderableField
true
if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.
There a few different reasons why this method may return false:
canRemoveValueFromIssueObject
in interface OrderableField<Collection<Version>>
issue
- The Issue object.true
if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
public RestFieldOperationsHandler getRestFieldOperation()
getRestFieldOperation
in interface RestFieldOperations
public JsonData getJsonDefaultValue(IssueContext issueCtx)
RestFieldOperations
getJsonDefaultValue
in interface RestFieldOperations
issueCtx
- Issue (This should really only need to be an issue context, but for historical reasons we need an issue object.Copyright © 2002-2017 Atlassian. All Rights Reserved.