@PublicApi public interface CustomField extends NavigableField, HideableField, ConfigurableField, RenderableField, RequirableField, OrderableField, RestAwareField, RestFieldOperations
CustomFieldManager,
eg. CustomFieldManager.getCustomFieldObjectByName(String)
To create or update an instance of a CustomField for an issue use OrderableField.createValue(com.atlassian.jira.issue.Issue,Object)
or 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).| Modifier and Type | Field and Description |
|---|---|
static String |
ENTITY_CF_TYPE_KEY |
static String |
ENTITY_CUSTOM_FIELD_SEARCHER |
static String |
ENTITY_DESCRIPTION |
static String |
ENTITY_ID |
static String |
ENTITY_ISSUETYPE |
static String |
ENTITY_NAME |
static String |
ENTITY_PROJECT |
static String |
ENTITY_TABLE_NAME |
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATHMOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY| Modifier and Type | Method and Description |
|---|---|
int |
compare(Issue issue1,
Issue issue2)
This method compares the values of this custom field in two given issues.
|
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedIssueTypes()
Returns a list of issue types associated with this custom field.
|
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedProjectCategories()
Deprecated.
Project Category contexts are not supported in JIRA and will be removed from the API. Since v6.4.
|
List<ProjectCategory> |
getAssociatedProjectCategoryObjects()
Deprecated.
Project Category contexts are not supported in JIRA and will be removed from the API. Since v6.4.
|
List<Project> |
getAssociatedProjectObjects()
Returns a list of projects associated with this custom field.
|
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedProjects()
Deprecated.
Use
getAssociatedProjectObjects() instead. Since v5.2. |
ClauseNames |
getClauseNames()
Return the JQL clause names that this custom field should be recognized by.
|
List<FieldConfigScheme> |
getConfigurationSchemes()
Returns a list of configuration schemes.
|
CustomFieldSearcher |
getCustomFieldSearcher()
Retrieves the
CustomFieldSearcher for this custom field. |
CustomFieldType |
getCustomFieldType()
Looks up the
CustomFieldType. |
CustomFieldParams |
getCustomFieldValues(Map customFieldValuesHolder)
Get the custom field string values that are relevant to this particular custom field
|
String |
getDescription()
Returns the 1i8n'ed description of this custom field.
|
RenderableProperty |
getDescriptionProperty()
Returns a
RenderableProperty for rendering this custom field's description. |
String |
getFieldName()
Returns the title of this custom field.
|
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Deprecated.
Use
Field.getName(), getDescription(), etc. Since v3.0. |
Long |
getIdAsLong()
Returns ID of this custom field.
|
Options |
getOptions(String key,
FieldConfig config,
JiraContextNode contextNode)
Returns options for this custom field if it is
of
MultipleCustomFieldType type. |
Options |
getOptions(String key,
JiraContextNode jiraContextNode)
Returns options for this custom field if it is
of
MultipleCustomFieldType type. |
com.opensymphony.module.propertyset.PropertySet |
getPropertySet() |
FieldConfig |
getRelevantConfig(Issue issue)
Returns a relevant
FieldConfig for the given issue. |
FieldConfig |
getRelevantConfig(IssueContext issueContext)
Returns the relevant field config of this custom field for the give issue context
|
FieldConfig |
getReleventConfig(SearchContext searchContext)
The
FieldConfig that is relevent to all issue contexts in the search context
Checks that all configs within search context are the same - i.e. |
String |
getUntranslatedDescription()
Returns the description of this custom field by reading
ENTITY_DESCRIPTION of the underlying generic value. |
RenderableProperty |
getUntranslatedDescriptionProperty()
Returns a
RenderableProperty for rendering this custom field's untranslated description, for admin. |
String |
getUntranslatedName()
Returns the name of this custom field by reading
ENTITY_NAME of the underlying generic value. |
Object |
getValue(Issue issue)
Retrieves and returns the Object representing the this CustomField value for the given issue.
|
boolean |
isAllIssueTypes()
Returns true if it applies for all issue types, false otherwise.
|
boolean |
isAllProjects()
Checks whether this custom field applies for all projects.
|
boolean |
isEditable()
Returns true if this custom field can be edited, false otherwise.
|
boolean |
isEnabled()
Returns true if all configuration schemes returned by
getConfigurationSchemes() are enabled. |
boolean |
isGlobal()
Returns true if this custom field applies for all projects and all issue types.
|
boolean |
isInScope(org.ofbiz.core.entity.GenericValue project,
List<String> issueTypeIds)
Deprecated.
Please use
isInScope(com.atlassian.jira.project.Project, java.util.List). This method was created in v4.3 as a temporary compatibility measure and has been always deprecated. |
boolean |
isInScope(long projectId,
String issueTypeId)
Determines if this custom field is within the scope of the given project, and Issue Type.
|
boolean |
isInScope(Project project,
List<String> issueTypeIds)
Determines if this custom field is within the scope of the given project, and list of Issue Types.
|
boolean |
isInScope(SearchContext searchContext)
Determines whether this custom field is in scope.
|
boolean |
isInScope(com.atlassian.crowd.embedded.api.User user,
SearchContext searchContext)
Deprecated.
Use
isInScope(com.atlassian.jira.issue.search.SearchContext) instead. Since v4.3 |
boolean |
isInScopeForSearch(Project project,
List<String> issueTypeIds)
Determines if this custom field is within the scope of the given project, and list of Issue Types.
|
boolean |
isRelevantForIssueContext(IssueContext issueContext)
Returns true if the custom field has a config for the Project and Issue Type of the given IssueContext.
|
Set<Long> |
remove()
Removes this custom field and returns a set of issue IDs of all issues that are affected by removal of this
custom field.
|
void |
setCustomFieldSearcher(CustomFieldSearcher searcher)
Deprecated.
|
void |
setDescription(String description)
Deprecated.
|
void |
setName(String name)
Deprecated.
|
void |
store()
Deprecated.
Use
CustomFieldManager.updateCustomField(CustomField) instead. Since v6.2. |
void |
validateFromActionParams(Map actionParameters,
ErrorCollection errorCollection,
FieldConfig config)
Validates relevant parameters on custom field type of this custom field.
|
getColumnCssClass, getColumnHeadingKey, getColumnViewHtml, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getSorter, getSortFields, prettyPrintChangeHistory, prettyPrintChangeHistorygetConfigurationItemTypesavailableForBulkEdit, canRemoveValueFromIssueObject, createValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getDefaultValue, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasParam, hasValue, isShown, needsMove, populateDefaults, populateForMove, populateFromIssue, populateFromParams, populateParamsFromString, removeValueFromIssueObject, updateIssue, updateValue, validateParamscreateAssociatedSearchHandlergetId, getName, getNameKeycompareTogetId, getValueFromIssue, isRenderablegetFieldTypeInfo, getJsonFromIssue, getJsonSchemagetJsonDefaultValue, getRestFieldOperationstatic final String ENTITY_CF_TYPE_KEY
static final String ENTITY_CUSTOM_FIELD_SEARCHER
static final String ENTITY_NAME
static final String ENTITY_ISSUETYPE
static final String ENTITY_PROJECT
static final String ENTITY_ID
static final String ENTITY_DESCRIPTION
static final String ENTITY_TABLE_NAME
boolean isInScope(Project project, List<String> issueTypeIds)
project - The project.issueTypeIds - A list of IssueType ids.true if this custom field is within the given scope.boolean isInScope(long projectId,
String issueTypeId)
projectId - The project.issueTypeId - The issueTypeIdtrue if this custom field is within the given scope.isRelevantForIssueContext(com.atlassian.jira.issue.context.IssueContext)boolean isInScopeForSearch(@Nullable Project project, @Nullable List<String> issueTypeIds)
If the project is null, then it is treated as any project. If the issueTypeIds list is null or an empty list, then it is treated as any issue type.
If the passed project is any project, this method will search in all the FieldConfigScheme
of this custom field, ignoring the projects that they apply to (since the given project is any)
and looking for at least one of them that applies to at least one of the given issue type ids.
If the passed list of issue types is any issue type, this method will search for at least one FieldConfigScheme
that applies to the given project, ignoring the issue types that it applies to (since the given issue type ids are any).
If both the project and issue types are any, the question being asked is "is this custom field in the scope of any project and any issue type?", which will always be true.
@Deprecated boolean isInScope(org.ofbiz.core.entity.GenericValue project, List<String> issueTypeIds)
isInScope(com.atlassian.jira.project.Project, java.util.List). This method was created in v4.3 as a temporary compatibility measure and has been always deprecated.project - project generic valueissueTypeIds - issue type IDs, e.g. ["1", "2"] for Bugs and New Featuresboolean isInScope(SearchContext searchContext)
searchContext - search contextboolean isInScope(com.atlassian.crowd.embedded.api.User user,
SearchContext searchContext)
isInScope(com.atlassian.jira.issue.search.SearchContext) instead. Since v4.3user - current usersearchContext - search context@Deprecated org.ofbiz.core.entity.GenericValue getGenericValue()
int compare(Issue issue1, Issue issue2) throws IllegalArgumentException
issue1 - issue to compareissue2 - issue to compareIllegalArgumentException - if any of given issues is nullCustomFieldParams getCustomFieldValues(Map customFieldValuesHolder)
customFieldValuesHolder - containing all paramsCustomFieldParams of String objectsObject getValue(Issue issue)
CustomFieldType.getValueFromIssue(CustomField,Issue).
This is only used to communicate with the 'view' JSP. Multiselects will return a list, dates a date, etc.issue - issue to retrieve the value fromOrderableField.getValueFromParams(java.util.Map)Set<Long> remove()
Options getOptions(String key, JiraContextNode jiraContextNode)
MultipleCustomFieldType type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objectskey - not usedjiraContextNode - JIRA context nodeMultipleCustomFieldType type, null otherwisevoid setName(String name)
CustomFieldManager.updateCustomField(Long, String, String, com.atlassian.jira.issue.customfields.CustomFieldSearcher) instead. Since v6.4.name - name to setString getDescription()
getDescriptionProperty().String getUntranslatedDescription()
ENTITY_DESCRIPTION of the underlying generic value.String getFieldName()
String getUntranslatedName()
ENTITY_NAME of the underlying generic value.@Nonnull RenderableProperty getDescriptionProperty()
RenderableProperty for rendering this custom field's description.@Nonnull RenderableProperty getUntranslatedDescriptionProperty()
RenderableProperty for rendering this custom field's untranslated description, for admin.void setDescription(String description)
CustomFieldManager.updateCustomField(Long, String, String, com.atlassian.jira.issue.customfields.CustomFieldSearcher) instead. Since v6.4.description - description to setCustomFieldSearcher getCustomFieldSearcher()
CustomFieldSearcher for this custom field.
The searcher, if found is initialized with this custom field before it is returned.void setCustomFieldSearcher(CustomFieldSearcher searcher)
CustomFieldManager.updateCustomField(Long, String, String, com.atlassian.jira.issue.customfields.CustomFieldSearcher) instead. Since v6.4.CustomFieldSearcher for this custom field.searcher - custom field searcher to associate with this custom field@Deprecated void store()
CustomFieldManager.updateCustomField(CustomField) instead. Since v6.2.boolean isEditable()
Long getIdAsLong()
List<FieldConfigScheme> getConfigurationSchemes()
FieldConfigScheme objects.Options getOptions(String key, FieldConfig config, JiraContextNode contextNode)
MultipleCustomFieldType type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objectskey - not usedconfig - relevant field configcontextNode - JIRA context nodeMultipleCustomFieldType type, null otherwiseFieldConfig getRelevantConfig(Issue issue)
FieldConfig for the given issue. If the field has
a config for the issue then one will be returned, otherwise null is returned.
For example, if we have 2 projects: project A and project B, and a custom field is configured to be only
applicable to project A, calling getRelevantConfig with an issue from project A should return the config
(i.e. not null). Calling this method with an issue from project B should
return null.issue - issue whose project and issue type will be used to check if the field has a configFieldConfig representing the configuration of the field for issue's
project/issue type. If the field does not have a config for issue's project/issue type, null is returned.isRelevantForIssueContext(com.atlassian.jira.issue.context.IssueContext)void validateFromActionParams(Map actionParameters, ErrorCollection errorCollection, FieldConfig config)
CustomFieldType.validateFromParams(CustomFieldParams,ErrorCollection,FieldConfig)actionParameters - action parameterserrorCollection - error collection to add errors toconfig - field configList<org.ofbiz.core.entity.GenericValue> getAssociatedProjectCategories()
getConfigurationSchemes() returns null.
It returns an empty list if the getConfigurationSchemes() returns an empty list.
The returned list should be sorted by project category name.GenericValue objects that represent associated project categories
as ProjectCategoryContext objectsList<ProjectCategory> getAssociatedProjectCategoryObjects()
getConfigurationSchemes() returns null.
It returns an empty list if the getConfigurationSchemes() returns an empty list.
The returned list should be sorted by project category name.ProjectCategoryContext objectsList<org.ofbiz.core.entity.GenericValue> getAssociatedProjects()
getAssociatedProjectObjects() instead. Since v5.2.getAssociatedProjects in interface ConfigurableFieldList<Project> getAssociatedProjectObjects()
getAssociatedProjectObjects in interface ConfigurableFieldList<org.ofbiz.core.entity.GenericValue> getAssociatedIssueTypes()
boolean isGlobal()
boolean isAllProjects()
boolean isAllIssueTypes()
boolean isEnabled()
getConfigurationSchemes() are enabled.CustomFieldType getCustomFieldType()
CustomFieldType. It can return null if the custom
field type cannot be found in the CustomFieldManager.boolean isRelevantForIssueContext(IssueContext issueContext)
getRelevantConfig(issueContext) != nullbut in general can run faster because it does not have to resolve the actual FieldConfig.
issueContext - IssueContext whose project and issue type will be used to check if the field has a configFieldConfig representing the configuration of the field for issue's
project/issue type. If the field does not have a config for issue's project/issue type, null is returned.getRelevantConfig(com.atlassian.jira.issue.context.IssueContext),
isInScope(long, String)FieldConfig getRelevantConfig(IssueContext issueContext)
getRelevantConfig in interface ConfigurableFieldissueContext - issue context to find the relevant field config forisRelevantForIssueContext(com.atlassian.jira.issue.context.IssueContext)FieldConfig getReleventConfig(SearchContext searchContext)
FieldConfig that is relevent to all issue contexts in the search context
Checks that all configs within search context are the same - i.e. all null or all the same config.
Returns null if any two configs are different.
Note: null config is not equal to non-null config. Previously, a non-null config was returned even if the first
config(s) was null.searchContext - search contextClauseNames getClauseNames()
com.opensymphony.module.propertyset.PropertySet getPropertySet()
Copyright © 2002-2015 Atlassian. All Rights Reserved.