com.atlassian.jira.issue.fields.CustomField |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Custom Field interface.
Typically one obtains a CustomField using CustomFieldManager
,
eg. getCustomFieldObjectByName(String)
To create or update an instance of a CustomField for an issue use createValue(com.atlassian.jira.issue.Issue, Object)
or 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)
.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method compares the values of this custom field in two given issues.
| |||||||||||
Returns a list of issue types associated with this custom field.
| |||||||||||
Returns a list of issue types associated with this custom field.
| |||||||||||
Returns a list of projects associated with this custom field.
| |||||||||||
Return the JQL clause names that this custom field should be recognized by.
| |||||||||||
Returns a list of configuration schemes.
| |||||||||||
Retrieves the
CustomFieldSearcher for this custom field. | |||||||||||
Looks up the
CustomFieldType . | |||||||||||
Get the custom field string values that are relevant to this particular custom field
| |||||||||||
Returns the 1i8n'ed description of this custom field.
| |||||||||||
Returns a
RenderableProperty for rendering this custom field's description. | |||||||||||
Returns the title of this custom field.
| |||||||||||
This method is deprecated.
Use
getName() , getDescription() , etc. Since v3.0.
| |||||||||||
Returns ID of this custom field.
| |||||||||||
Returns options for this custom field if it is
of
MultipleCustomFieldType type. | |||||||||||
Returns options for this custom field if it is
of
MultipleCustomFieldType type. | |||||||||||
Returns the relevant field config of this custom field for the give issue context
| |||||||||||
Returns a relevant
FieldConfig for the given issue. | |||||||||||
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. | |||||||||||
Returns the description of this custom field by reading
ENTITY_DESCRIPTION of the underlying generic value. | |||||||||||
Returns a
RenderableProperty for rendering this custom field's untranslated description, for admin. | |||||||||||
Returns the name of this custom field by reading
ENTITY_NAME of the underlying generic value. | |||||||||||
Retrieves and returns the Object representing the this CustomField value for the given issue.
| |||||||||||
Returns true if it applies for all issue types, false otherwise.
| |||||||||||
Checks whether this custom field applies for all projects.
| |||||||||||
Returns true if this custom field can be edited, false otherwise.
| |||||||||||
Returns true if all configuration schemes returned by
getConfigurationSchemes() are enabled. | |||||||||||
Returns true if this custom field applies for all projects and all issue types.
| |||||||||||
Determines whether this custom field is in scope.
| |||||||||||
Determines if this custom field is within the scope of the given project, and list of Issue Types.
| |||||||||||
Determines if this custom field is within the scope of the given project, and Issue Type.
| |||||||||||
Determines if this custom field is within the scope of the given project, and list of Issue Types.
| |||||||||||
Returns true if the custom field has a config for the Project and Issue Type of the given IssueContext.
| |||||||||||
This method is deprecated.
Use
removeCustomField(CustomField) instead. Since v7.0.
| |||||||||||
Validates relevant parameters on custom field type of this custom field.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
This method compares the values of this custom field in two given issues.
Returns a negative integer, zero, or a positive integer as the value of first issue is less than, equal to, or greater than the value of the second issue.
If either of given issues is null a IllegalArgumentException is thrown.
issue1 | issue to compare |
---|---|
issue2 | issue to compare |
IllegalArgumentException | if any of given issues is null |
---|
Returns a list of issue types associated with this custom field. Will be null if the field is global
Returns a list of issue types associated with this custom field. Will be null if the field is global
Returns a list of projects associated with this custom field. Will be null if the field is global
Return the JQL clause names that this custom field should be recognized by.
Returns a list of configuration schemes.
FieldConfigScheme
objects.
Retrieves the CustomFieldSearcher
for this custom field.
The searcher, if found is initialized with this custom field before it is returned.
Looks up the CustomFieldType
. It can return null if the custom
field type cannot be found in the CustomFieldManager
.
Get the custom field string values that are relevant to this particular custom field
customFieldValuesHolder | containing all params |
---|
CustomFieldParams
of String
objects
Returns the 1i8n'ed description of this custom field. To render views for the custom field description, prefer
getDescriptionProperty()
.
Returns a RenderableProperty
for rendering this custom field's description.
Returns the title of this custom field.
This method is deprecated.
Use getName()
, getDescription()
, etc. Since v3.0.
Returns a generic value that represents this custom field
Returns options for this custom field if it is
of MultipleCustomFieldType
type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objects
key | not used |
---|---|
config | relevant field config |
contextNode | JIRA context node |
MultipleCustomFieldType
type, null otherwise
Returns options for this custom field if it is
of MultipleCustomFieldType
type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objects
key | not used |
---|---|
jiraContextNode | JIRA context node |
MultipleCustomFieldType
type, null otherwise
Returns the relevant field config of this custom field for the give issue context
issueContext | issue context to find the relevant field config for |
---|
Returns a relevant 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 config |
---|
FieldConfig
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.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. 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 context |
---|
Returns the description of this custom field by reading ENTITY_DESCRIPTION
of the underlying generic value.
Returns a RenderableProperty
for rendering this custom field's untranslated description, for admin.
Returns the name of this custom field by reading ENTITY_NAME
of the underlying generic value.
Retrieves and returns the Object representing the this CustomField value for the given issue.
See 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 from |
---|
Returns true if it applies for all issue types, false otherwise.
Checks whether this custom field applies for all projects. It returns true if it applies for all projects for any field configuration scheme, false otherwise.
Returns true if this custom field can be edited, false otherwise.
Returns true if all configuration schemes returned by getConfigurationSchemes()
are enabled.
Returns true if this custom field applies for all projects and all issue types.
Determines whether this custom field is in scope.
searchContext | search context |
---|
Determines if this custom field is within the scope of the given project, and list of Issue Types.
project | The project. |
---|---|
issueTypeIds | A list of IssueType ids. |
true
if this custom field is within the given scope.
Determines if this custom field is within the scope of the given project, and Issue Type.
projectId | The project. |
---|---|
issueTypeId | The issueTypeId |
true
if this custom field is within the given scope.Determines if this custom field is within the scope of the given project, and list of Issue Types.
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.
Returns true if the custom field has a config for the Project and Issue Type of the given IssueContext.
This is equivalent to calling
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 config |
---|
FieldConfig
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.
This method is deprecated.
Use removeCustomField(CustomField)
instead. Since v7.0.
Removes this custom field and returns a set of issue IDs of all issues that are affected by removal of this custom field.
DataAccessException | if removal of generic value fails |
---|
Validates relevant parameters on custom field type of this custom field. Any errors found are added to the given
errorCollection.
See validateFromParams(CustomFieldParams, ErrorCollection, FieldConfig)
actionParameters | action parameters |
---|---|
errorCollection | error collection to add errors to |
config | field config |