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, versionManagerauthenticationContextORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATHMOVE_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, validateParamsgetColumnCssClass, getHiddenFieldId, getSortComparatorSource, getSortFields, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistorycreateAssociatedSearchHandler, getApplicationProperties, getCreateHtml, getEditHtml, getFieldLayoutItemForBulkOperation, getIssueForBulkOperation, getPermissionManager, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasParam, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, validateBulkEditHtmlProperties, valuesEqualcompareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetColumnCssClass, getColumnViewHtml, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getSortFields, prettyPrintChangeHistory, prettyPrintChangeHistoryavailableForBulkEdit, createValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasParam, hasValue, needsMove, populateDefaults, populateForMove, populateFromIssue, populateFromParams, populateParamsFromString, updateValue, validateParamscreateAssociatedSearchHandlergetId, getName, getNameKeycompareTopublic 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)
OrderableFieldisShown in interface OrderableField<Collection<Version>>issue - The Issue.protected Collection<Version> getCurrentVersions(Issue issue)
getCurrentVersions in class AbstractVersionsSystemFieldprotected String getArchivedVersionsFieldTitle()
getArchivedVersionsFieldTitle in class AbstractVersionsSystemFieldprotected String getArchivedVersionsFieldSearchParam()
getArchivedVersionsFieldSearchParam in class AbstractVersionsSystemFieldprotected boolean getUnreleasedVersionsFirst()
getUnreleasedVersionsFirst in class AbstractVersionsSystemFieldprotected void addFieldRequiredErrorMessage(Issue issue, ErrorCollection errorCollection, I18nHelper i18n)
addFieldRequiredErrorMessage in class AbstractVersionsSystemFieldpublic String getColumnHeadingKey()
getColumnHeadingKey in interface NavigableFieldpublic LuceneFieldSorter getSorter()
NavigableFieldgetSorter in interface NavigableFieldNavigableField.getSortComparatorSource()DocumentIssueImpl,
MappedSortComparatorprotected String getIssueRelationName()
getIssueRelationName in class AbstractVersionsSystemFieldprotected String getChangeItemFieldName()
getChangeItemFieldName in class AbstractVersionsSystemFieldprotected List<ChangeItemBean> updateIssueValue(Issue issue, Collection<Version> newValue)
updateIssueValue in class AbstractVersionsSystemFieldprotected String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
getModifiedWithoutPermissionErrorMessage in class AbstractVersionsSystemFieldpublic Collection<Version> getDefaultValue(Issue issue)
OrderableFieldFor 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 AbstractVersionsSystemFieldissue - the Issue.public void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)
OrderableFieldupdateIssue 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)
OrderableFieldNote 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)
OrderableFieldtrue 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 RestFieldOperationspublic JsonData getJsonDefaultValue(IssueContext issueCtx)
RestFieldOperationsgetJsonDefaultValue in interface RestFieldOperationsissueCtx - 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.