@PublicApi public final class CoreEffects extends Object
effect descriptions
for common effects provided by Structure.Modifier and Type | Method and Description |
---|---|
static StoredEffect |
assignIssue(Issue issue,
ApplicationUser assignee)
Returns a description of an effect that would assign an issue to the given user.
|
static StoredEffect |
emitWarning(I18nText i18nText,
List<ItemIdentity> itemIdentities)
Returns a description of an effect that can't be deserialized successfully but used to describe a specific problem.
|
static StoredEffect |
setCascadeCustomField(Issue issue,
CustomField customField,
Option value)
Returns a description of an effect that would set a cascading select custom
field to the given option.
|
static StoredEffect |
setDateCustomField(Issue issue,
CustomField customField,
Date value)
Returns a description of an effect that would set a date custom
field to the given value.
|
static StoredEffect |
setDateTimeCustomField(Issue issue,
CustomField customField,
Date value)
Returns a description of an effect that would set a date time custom
field to the given value.
|
static StoredEffect |
setIssueDescription(Issue issue,
String description)
Returns a description of an effect that would change an issue Description field to the given value.
|
static StoredEffect |
setIssueDueDate(Issue issue,
Date date)
Returns a description of an effect that would change an issue due date to the given value.
|
static StoredEffect |
setIssueEnvironment(Issue issue,
String environment)
Returns a description of an effect that would change an issue Environment field to the given value.
|
static StoredEffect |
setIssuePriority(Issue issue,
Priority priority)
Returns a description of an effect that would change an issue priority to the given value.
|
static StoredEffect |
setIssueReporter(Issue issue,
ApplicationUser reporter)
Returns a description of an effect that would set an issue reporter to the given user.
|
static StoredEffect |
setIssueResolution(Issue issue,
Resolution resolution)
Returns a description of an effect that would change an issue Resolution field to the given value.
|
static StoredEffect |
setIssueResolutionDate(Issue issue,
Date date)
Deprecated.
The "Resolved" field in Jira is not editable, and this method
should not be used. There is no corresponding effect provider in Structure.
|
static StoredEffect |
setIssueStatus(Issue issue,
Status status)
Returns a description of an effect that would transition an issue to the given
status.
|
static StoredEffect |
setIssueSummary(Issue issue,
String summary)
Returns a description of an effect that would change an issue summary to the given value.
|
static StoredEffect |
setNumberCustomField(Issue issue,
CustomField customField,
Number value)
Returns a description of an effect that would set a number custom
field to the given value.
|
static StoredEffect |
setProjectPickerCustomField(Issue issue,
CustomField customField,
Project value)
Returns a description of an effect that would set a project picker custom
field to the given value.
|
static StoredEffect |
setSingleSelectCustomField(Issue issue,
CustomField customField,
Option value)
Returns a description of an effect that would set a single select custom
field to the given option.
|
static StoredEffect |
setSingleUserCustomField(Issue issue,
CustomField customField,
ApplicationUser value)
Returns a description of an effect that would set a single user custom
field to the given value.
|
static StoredEffect |
setSingleVersionCustomField(Issue issue,
CustomField customField,
Version value)
Returns a description of an effect that would set a single version custom
field to the given value.
|
static StoredEffect |
setTextCustomField(Issue issue,
CustomField customField,
String value)
Returns a description of an effect that would set a text custom
field to the given value.
|
@NotNull public static StoredEffect emitWarning(@NotNull I18nText i18nText, @NotNull List<ItemIdentity> itemIdentities)
i18nText
- The warning message.itemIdentities
- An ID list of items to which the warning message is related.@NotNull public static StoredEffect assignIssue(@NotNull Issue issue, @Nullable ApplicationUser assignee)
issue
- The issue.assignee
- The user to set. Passing null
will make the issue unassigned.@NotNull public static StoredEffect setIssueReporter(@NotNull Issue issue, @Nullable ApplicationUser reporter)
issue
- The issue.reporter
- The user to set. Passing null
will clear the reporter value.@NotNull public static StoredEffect setIssuePriority(@NotNull Issue issue, @Nullable Priority priority)
issue
- The issue.priority
- The priority to set. Passing null
will clear the priority value.@NotNull public static StoredEffect setIssueDescription(@NotNull Issue issue, @Nullable String description)
issue
- The issue.description
- The description value to set. Passing null
will clear an issue description.@NotNull public static StoredEffect setIssueEnvironment(@NotNull Issue issue, @Nullable String environment)
issue
- The issue.environment
- The environment value to set. Passing null
will clear the Environment field value.@NotNull public static StoredEffect setIssueResolution(@NotNull Issue issue, @Nullable Resolution resolution)
issue
- The issue.resolution
- The resolution to set. Passing null
will clear the Resolution field value.@NotNull public static StoredEffect setIssueSummary(@NotNull Issue issue, @Nullable String summary)
issue
- The issue.summary
- The summary value to set. Passing null
will clear the issue summary.@NotNull public static StoredEffect setIssueDueDate(@NotNull Issue issue, @Nullable Date date)
issue
- The issue.date
- The due date to set. Passing null
will clear the issue due date.@NotNull @Deprecated public static StoredEffect setIssueResolutionDate(@NotNull Issue issue, @Nullable Date date)
issue
- The issue.date
- The resolution date to set. Passing null
will clear the issue resolution date.@NotNull public static StoredEffect setIssueStatus(@NotNull Issue issue, @Nullable Status status)
issue
- The issue.status
- The status. Passing null
is allowed, but would produce
an effect that would always deserialize with an error.@NotNull public static StoredEffect setSingleSelectCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Option value)
issue
- The issue.customField
- The custom field, must be a single select custom field.value
- The option to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a single select field.@NotNull public static StoredEffect setProjectPickerCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Project value)
issue
- The issue.customField
- The custom field, must be a project picker custom field.value
- The project value to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a project picker field.@NotNull public static StoredEffect setSingleUserCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable ApplicationUser value)
issue
- The issue.customField
- The custom field, must be a single user custom field.value
- The user to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a single user field.@NotNull public static StoredEffect setSingleVersionCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Version value)
issue
- The issue.customField
- The custom field, must be a single version custom field.value
- The version to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a single version field.@NotNull public static StoredEffect setTextCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable String value)
issue
- The issue.customField
- The custom field, must be a text custom field.value
- The text value to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a text field.@NotNull public static StoredEffect setNumberCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Number value)
issue
- The issue.customField
- The custom field, must be a number custom field.value
- The number value to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a number field.@NotNull public static StoredEffect setDateCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Date value)
issue
- The issue.customField
- The custom field, must be a date custom field.value
- The date value to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a date field.@NotNull public static StoredEffect setDateTimeCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Date value)
issue
- The issue.customField
- The custom field, must be a date time custom field.value
- The text value to set. Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a date time field.@NotNull public static StoredEffect setCascadeCustomField(@NotNull Issue issue, @NotNull CustomField customField, @Nullable Option value)
issue
- The issue.customField
- The custom field, must be a cascading select custom field.value
- The option to set. Can be a parent or a child option.
Passing null
will clear the field value.IllegalArgumentException
- if the given custom field is not a cascading select field.Copyright © 2020 ALM Works. All Rights Reserved.