com.atlassian.jira.bc.issue.label.LabelService |
![]() |
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).
The label service is responsible for setting and getting labels for issue and custom field combinations. It can also be used to add and remove individual labels from an isssue.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LabelService.AddLabelValidationResult | |||||||||||
LabelService.LabelSuggestionResult | |||||||||||
LabelService.LabelValidationResult | |||||||||||
LabelService.LabelsResult | |||||||||||
LabelService.SetLabelValidationResult |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the label to the issue specified by the validation result.
| |||||||||||
Returns all the labels for the given issue.
| |||||||||||
Returns all the labels for the given issue and custom field.
| |||||||||||
Given a token to search for, this method returns a number of suggestions for the label.
| |||||||||||
Given a token to search for, this method returns a number of suggestions for the label.
| |||||||||||
Sets the labels for a particular issue to the set specified as a parameter.
| |||||||||||
Validates that the user provided can add the label provided for a particular issue.
| |||||||||||
Validates that the user provided can add the label provided for a particular issue.
| |||||||||||
Validates that the user provided can set the labels provided for a particular issue.
| |||||||||||
Validates that the user provided can set the labels provided for a particular issue.
|
Adds the label to the issue specified by the validation result.
user | The user performing the operation |
---|---|
result | The validation result obtained via validateAddLabel(com.atlassian.jira.user.ApplicationUser, Long, String) |
sendNotification | true if a notification e-mail should be sent, false otherwise |
Returns all the labels for the given issue.
user | The user performing the operation |
---|---|
issueId | The issue id that the label is linked against |
Returns all the labels for the given issue and custom field. The custom field may also be null, in which case the labels for the system field will be returned.
user | The user performing the operation |
---|---|
issueId | The issue id that the label is linked against |
customFieldId | Custom field id for the labels CF or null if it's the system field. |
Given a token to search for, this method returns a number of suggestions for the label. The token may also be null or empty in which case a list of suggestions will be returned sorted by most popular labels for the labels custom field provided. If a token was provided, then a list of labels sorted alphabetically starting with the token will be returned. If provided, any labels that the issue already has will be removed from the list of suggestions. The token needs to be at least 2 characters long to generate suggestions starting with that token, otherwise an empty collection is returned.
user | The user trying to get label suggestions |
---|---|
issueId | The issue for which suggestions are being fetched or null |
customFieldId | The labels custom field for which to provide suggestions |
token | The prefix for the labels to be suggested. May be null for popular label suggestions |
Given a token to search for, this method returns a number of suggestions for the label. The token may also be null or empty in which case a list of suggestions will be returned sorted by most popular labels for the labels system field. If a token was provided, then a list of labels sorted alphabetically starting with the token will be returned. If provided, any labels that the issue already has will be removed from the list of suggestions. The token needs to be at least 2 characters to generate suggestions starting with that token, otherwise an empty collection is returned.
user | The user trying to get label suggestions |
---|---|
issueId | The issue for which suggestions are being fetched or null |
token | The prefix for the labels to be suggested. May be null for popular label suggestions |
Sets the labels for a particular issue to the set specified as a parameter. The set may be an empty set in order to clear all labels for an issue.
user | The user performing the operation |
---|---|
result | The validation result obtained by calling validateSetLabels(com.atlassian.jira.user.ApplicationUser, Long, java.util.Set) |
sendNotification | true if a notification e-mail should be sent, false otherwise |
causeChangeNotification | true if a change history should be created, false otherwise |
Validates that the user provided can add the label provided for a particular issue. Validation will ensure that the user has the EDIT_ISSUE permission for the issue in question. The label will also be validated to ensure that it doesn't contain spaces and that it doesn't exceed the max length of 255 characters.
user | The user performing the operation |
---|---|
issueId | The issue id of the issue that labels will be set on |
label | The actual labels as strings to set on the issue |
Validates that the user provided can add the label provided for a particular issue. Validation will ensure that the user has the EDIT_ISSUE permission for the issue in question. The label will also be validated to ensure that it doesn't contain spaces and that it doesn't exceed the max length of 255 characters. Validation will also ensure that the custom field with the id provided exists.
user | The user performing the operation |
---|---|
issueId | The issue id of the issue that labels will be set on |
customFieldId | Custom field id for the labels CF or null if it's the system field. |
label | The actual labels as strings to set on the issue |
Validates that the user provided can set the labels provided for a particular issue. Validation will ensure that the user has the EDIT_ISSUE permission for the issue in question. The labels will also be validated to ensure that they don't contain spaces and that they don't exceed the max length of 255 characters each.
user | The user performing the operation |
---|---|
issueId | The issue id of the issue that labels will be set on |
labels | The actual labels as strings to set on the issue |
Validates that the user provided can set the labels provided for a particular issue. Validation will ensure that the user has the EDIT_ISSUE permission for the issue in question. The labels will also be validated to ensure that they don't contain spaces and that they don't exceed the max length of 255 characters each. Validation will also ensure that the custom field with the id provided exists.
user | The user performing the operation |
---|---|
issueId | The issue id of the issue that labels will be set on |
customFieldId | The custom field id against which to set the labels |
labels | The actual labels as strings to set on the issue |