@PublicApi
public interface VersionService
VersionService
Modifier and Type | Interface and Description |
---|---|
static class |
VersionService.AbstractVersionResult |
static class |
VersionService.ArchiveVersionValidationResult |
static class |
VersionService.CreateVersionValidationResult |
static class |
VersionService.MoveVersionValidationResult |
static class |
VersionService.ReasonsServiceResult<R,T>
A generified
ServiceResultImpl that allows Service-specified Reasons to be set as part of the result (in
addition to Reasons specified inside the ErrorCollection . |
static class |
VersionService.ReleaseVersionValidationResult |
static interface |
VersionService.ValidationResult
Represents the results of performing a validation call for a single merge or delete operation.
|
static interface |
VersionService.VersionAction |
static class |
VersionService.VersionBuilderValidationResult
Result object that relates to new VersionService methods that take a
VersionBuilder as a parameter. |
static class |
VersionService.VersionExtractableField |
static class |
VersionService.VersionResult |
static class |
VersionService.VersionsResult |
Modifier and Type | Field and Description |
---|---|
static VersionService.VersionAction |
REMOVE
Indicates that the
Version should be removed from affected issues. |
Modifier and Type | Method and Description |
---|---|
Version |
archiveVersion(VersionService.ArchiveVersionValidationResult result)
Takes a validation result and performs the archive operation.
|
ServiceOutcome<Version> |
create(ApplicationUser user,
VersionService.VersionBuilderValidationResult validationResult)
Creates a new
Version , based on the validation result from calling #validateCreate(User,
VersionBuilder) . |
Version |
createVersion(ApplicationUser user,
VersionService.CreateVersionValidationResult request)
Deprecated.
Use
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult) .
Since v6.4 |
DeleteVersionWithReplacementsParameterBuilder |
createVersionDeletaAndReplaceParameters(Version versionToDelete)
Create builder that for paramaters to remove version with swap (including custom fields)
|
void |
decreaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to have a higher sequence number - ie make it later.
|
void |
delete(JiraServiceContext context,
VersionService.ValidationResult result)
Deprecated.
Use
deleteVersionAndSwap(JiraServiceContext, DeleteVersionWithCustomFieldParameters) that
supports swapping version in custom fields.
Since v7.0.10 |
ServiceResult |
deleteVersionAndSwap(JiraServiceContext serviceContext,
DeleteVersionWithCustomFieldParameters parameters)
Remove specified version.
|
long |
getAffectsIssuesCount(Version version)
Return the count of Issues that have the "Affects Version" field set to version.
|
long |
getCustomFieldIssuesCount(Version version)
This method returns the total number of issues where this version is used in custom fields
|
Collection<CustomFieldWithVersionUsage> |
getCustomFieldsUsing(Version version)
This method returns usage information in custom fields for a given version.
|
long |
getFixIssuesCount(Version version)
Return the count of Issues Fixed in this version.
|
long |
getUnresolvedIssuesCount(ApplicationUser user,
Version version)
Return the count of Issues that are unresolved in this version.
|
VersionService.VersionResult |
getVersionById(ApplicationUser user,
Long versionId)
Used to retrieve a
Version object by version id. |
VersionService.VersionResult |
getVersionById(ApplicationUser user,
Project project,
Long versionId)
|
VersionService.VersionResult |
getVersionByProjectAndName(ApplicationUser user,
Project project,
String versionName)
|
VersionService.VersionsResult |
getVersionsByProject(ApplicationUser user,
Project project)
|
ServiceOutcome<Page<Version>> |
getVersionsByProject(ApplicationUser user,
Project project,
PageRequest pageRequest)
This method returns all versions for a given project.
|
ServiceOutcome<Page<Version>> |
getVersionsByProject(ApplicationUser user,
Project project,
PageRequest pageRequest,
OrderByRequest<VersionService.VersionExtractableField> orderBy)
This method returns all versions for a given project.
|
void |
increaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to have a lower sequence number - ie make it earlier.
|
boolean |
isOverdue(Version version)
Is the passed version overdue? This method does no permission checks on the passed version.
|
void |
merge(JiraServiceContext context,
VersionService.ValidationResult result)
Merges a version into another, then removes the original version.
|
void |
moveToEndVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to the end of the version sequence.
|
void |
moveToStartVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to the start of the version list.
|
void |
moveUnreleasedToNewVersion(ApplicationUser user,
Version currentVersion,
Version newVersion)
Using the validation result from
#validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be released. |
void |
moveVersionAfter(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version after another version.
|
VersionBuilder |
newVersionBuilder()
Creates a builder to be used when creating a new
Version . |
VersionBuilder |
newVersionBuilder(Version version)
Creates a builder to be used when updating an existing
Version . |
Version |
releaseVersion(VersionService.ReleaseVersionValidationResult result)
Using the validation result from
#validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be released. |
ServiceOutcome<Version> |
setReleaseDate(ApplicationUser user,
Version version,
Date releaseDate)
Deprecated.
Use
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder) .
Since v6.4 |
ServiceOutcome<Version> |
setReleaseDate(ApplicationUser user,
Version version,
String releaseDate)
Deprecated.
Use
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder) .
Since v6.4 |
ServiceOutcome<Version> |
setVersionDetails(ApplicationUser user,
Version version,
String name,
String description)
Deprecated.
Use
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder) .
Since v6.4 |
Version |
unarchiveVersion(VersionService.ArchiveVersionValidationResult result)
Takes a validation result and performs the unarchive operation.
|
Version |
unreleaseVersion(VersionService.ReleaseVersionValidationResult result)
Using the validation result from
#validateUnreleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be unreleased. |
ServiceOutcome<Version> |
update(ApplicationUser user,
VersionService.VersionBuilderValidationResult validationResult)
Updates the existing
Version , based on the validation result from calling #validateUpdate(User,
VersionBuilder) . |
VersionService.ArchiveVersionValidationResult |
validateArchiveVersion(ApplicationUser user,
Version version)
This method should be called before archiving a version.
|
VersionService.VersionBuilderValidationResult |
validateCreate(ApplicationUser user,
VersionBuilder versionBuilder)
Validates the creation of a new
Version object, specified with a VersionBuilder . |
VersionService.CreateVersionValidationResult |
validateCreateVersion(ApplicationUser user,
Project project,
String versionName,
Date releaseDate,
String description,
Long scheduleAfterVersion)
Deprecated.
Use
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult) .
Since v6.4 |
VersionService.CreateVersionValidationResult |
validateCreateVersion(ApplicationUser user,
Project project,
String versionName,
String releaseDate,
String description,
Long scheduleAfterVersion)
Deprecated.
Use
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult) .
Since v6.4. |
VersionService.MoveVersionValidationResult |
validateDecreaseVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to have a higher sequence number - ie make it later.
|
VersionService.ValidationResult |
validateDelete(JiraServiceContext context,
Long versionId,
VersionService.VersionAction affectsAction,
VersionService.VersionAction fixAction)
Deprecated.
Use
deleteVersionAndSwap(JiraServiceContext, DeleteVersionWithCustomFieldParameters) that
supports swapping version in custom fields.
Since v7.0.10 |
VersionService.MoveVersionValidationResult |
validateIncreaseVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to have a lower sequence number - ie make it earlier.
|
VersionService.ValidationResult |
validateMerge(JiraServiceContext context,
Long versionId,
Long swapVersionId)
Validates an attempt to merge a version into another.
|
VersionService.MoveVersionValidationResult |
validateMoveToEndVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to the end of the version sequence.
|
VersionService.MoveVersionValidationResult |
validateMoveToStartVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to the start of the version list.
|
VersionService.MoveVersionValidationResult |
validateMoveVersionAfter(ApplicationUser user,
long versionId,
Long scheduleAfterVersion)
Validate Move a version after another version.
|
ServiceOutcome<Version> |
validateReleaseDate(ApplicationUser user,
Version version,
String releaseDate)
Deprecated.
Use
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder) .
Since v6.4 |
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(ApplicationUser user,
Version version,
Date releaseDate)
This method needs to be called before releasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(ApplicationUser user,
Version version,
String releaseDate)
This method needs to be called before releasing a version to ensure all parameters are correct.
|
VersionService.ArchiveVersionValidationResult |
validateUnarchiveVersion(ApplicationUser user,
Version version)
This method should be called before unarchiving a version.
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(ApplicationUser user,
Version version,
Date releaseDate)
This method needs to be called before unreleasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(ApplicationUser user,
Version version,
String releaseDate)
This method needs to be called before unreleasing a version to ensure all parameters are correct.
|
VersionService.VersionBuilderValidationResult |
validateUpdate(ApplicationUser user,
VersionBuilder versionBuilder)
Validates the update of an existing
Version object, specified with a VersionBuilder . |
ErrorCollection |
validateVersionDetails(ApplicationUser user,
Version version,
String name,
String description)
Deprecated.
Use
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder) .
Since v6.4 |
static final VersionService.VersionAction REMOVE
Version
should be removed from affected issues.@Deprecated ErrorCollection validateVersionDetails(ApplicationUser user, Version version, String name, String description)
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is performing the edit operationversion
- the version that they want to editname
- the new name for the version (must not be null or already in use)description
- the new description for the versionIllegalArgumentException
- if the name is null or duplicates an existing name@Deprecated ServiceOutcome<Version> setVersionDetails(ApplicationUser user, Version version, String name, String description)
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is performing the edit operationversion
- the version that they want to editname
- the new name for the version (must not be null or already in use)description
- the new description for the versionIllegalArgumentException
- if the name is null or duplicates an existing name@Deprecated ServiceOutcome<Version> setReleaseDate(ApplicationUser user, Version version, Date releaseDate)
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use@Deprecated ServiceOutcome<Version> validateReleaseDate(ApplicationUser user, Version version, String releaseDate)
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use@Deprecated ServiceOutcome<Version> setReleaseDate(ApplicationUser user, Version version, String releaseDate)
#validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to useVersionService.ValidationResult validateDelete(JiraServiceContext context, Long versionId, VersionService.VersionAction affectsAction, VersionService.VersionAction fixAction)
deleteVersionAndSwap(JiraServiceContext, DeleteVersionWithCustomFieldParameters)
that
supports swapping version in custom fields.
Since v7.0.10context
- The context for this service call.versionId
- The id of the version to be deleted.affectsAction
- Used to decide whether to move all the issues to a different 'affects' version or just
remove them. See VersionKeys.REMOVE_ACTION
, VersionKeys.SWAP_ACTION
fixAction
- Used to decide wether to move all the issues to a different 'fix' version or just remove them.
See VersionKeys.REMOVE_ACTION
, VersionKeys.SWAP_ACTION
VersionService.ValidationResult
object which contains the version to delete, and the versions to swap to for
Affects and Fix versions, or null if the action to be taken is VersionKeys.REMOVE_ACTION
void delete(JiraServiceContext context, VersionService.ValidationResult result)
deleteVersionAndSwap(JiraServiceContext, DeleteVersionWithCustomFieldParameters)
that
supports swapping version in custom fields.
Since v7.0.10context
- The context for this service call.result
- The result of validation, which contains the version to be deleted, and the swap versions for
Affects and Fix fieldsVersionService.ValidationResult validateMerge(JiraServiceContext context, Long versionId, Long swapVersionId)
VersionKeys.SWAP_ACTION
.context
- The context for this service call.versionId
- The original version to be merged and removed.swapVersionId
- The target version of the merge operation. Must be from the same project.VersionService.ValidationResult
object which contains the version to delete, and the versions to swap to for
Affects and Fix versions, or null if the action to be taken is VersionKeys.REMOVE_ACTION
void merge(JiraServiceContext context, VersionService.ValidationResult result)
context
- The context for this service call.result
- The result of validation, which contains the version to be deleted, and the swap versions for
Affects and Fix fieldsVersionService.VersionResult getVersionById(ApplicationUser user, Project project, Long versionId)
Version
object by version id within project
specified by Project
object. This method returns a VersionService.VersionResult
. The version will be null if no version for
the id specified can be found, or if the user making the request does not have the ADMIN, PROJECT_ADMIN or BROWSE
project permission for the project. In both of these cases, the errorCollection in the result object will contain
an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested versionversionId
- The id of requested versionVersionService.VersionResult getVersionById(ApplicationUser user, Long versionId)
Version
object by version id. This method returns a
VersionService.VersionResult
. The version will be null if no
version for the id specified can be found, or if the user making the request does not have the ADMIN,
PROJECT_ADMIN or BROWSE project permission for the project. In both of these cases, the errorCollection in the
result object will contain an appropriate error message.user
- The user trying to get a versionversionId
- The id of requested version@Nonnull VersionService.VersionResult getVersionByProjectAndName(@Nullable ApplicationUser user, @Nonnull Project project, @Nonnull String versionName)
Version
object by version name within project
specified by Project
object. This method returns a VersionService.VersionResult
. The version will be null if no version for
the versionName specified can be found, or if the user making the request does not have the ADMIN, PROJECT_ADMIN
or BROWSE project permission for the project. In both of these cases, the errorCollection in the result object
will contain an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested versionversionName
- The name of requested version@Nonnull VersionService.VersionsResult getVersionsByProject(@Nullable ApplicationUser user, @Nonnull Project project)
Version
collection within project specified by
Project
object. This method returns a VersionService.VersionsResult
. The versions collection will be empty if
the user making the request does not have the ADMIN, PROJECT_ADMIN or BROWSE project permission for the project.
In this case, the errorCollection in the result object will contain an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested version@Nonnull ServiceOutcome<Page<Version>> getVersionsByProject(@Nullable ApplicationUser user, @Nonnull Project project, @Nonnull PageRequest pageRequest)
getVersionsByProject(ApplicationUser, Project)
but the results
it returns are paged.
The user making the request must have the ADMIN, PROJECT_ADMIN or BROWSE project permissions for the project. Otherwise, the errorCollection in the result object will contain an appropriate error message.
user
- The user trying to get a versionproject
- The project object containing requested versionpageRequest
- details of a page to return (offset, max number of results)getVersionsByProject(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project, com.atlassian.jira.util.PageRequest, com.atlassian.jira.util.OrderByRequest)
@Nonnull ServiceOutcome<Page<Version>> getVersionsByProject(@Nullable ApplicationUser user, @Nonnull Project project, @Nonnull PageRequest pageRequest, @Nullable OrderByRequest<VersionService.VersionExtractableField> orderBy)
It also provides the possibility to sort the results by the fields specified in the VersionService.VersionExtractableField
class.
The user making the request must have the ADMIN, PROJECT_ADMIN or BROWSE project permissions for the project. Otherwise, the errorCollection in the result object will contain an appropriate error message.
user
- The user trying to get a versionproject
- The project object containing requested versionpageRequest
- details of a page to return (offset, max number of results)orderBy
- details on how to order the resultsgetVersionsByProject(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project, com.atlassian.jira.util.PageRequest)
@Deprecated VersionService.CreateVersionValidationResult validateCreateVersion(ApplicationUser user, Project project, String versionName, String releaseDate, String description, Long scheduleAfterVersion)
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4.Optional validation will be done for the release date, if provided. An error will be returned, if date format is valid.
The method will return a VersionService.CreateVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to create a versionproject
- The project object containing requested versionversionName
- The name of created versionreleaseDate
- The release date for a version (optional)description
- The description for a version (optional)scheduleAfterVersion
- The version after which created version should be scheduled (optional)@Deprecated VersionService.CreateVersionValidationResult validateCreateVersion(ApplicationUser user, Project project, String versionName, Date releaseDate, String description, Long scheduleAfterVersion)
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4Optional validation will be done for the release date, if provided. An error will be returned, if date format is valid.
The method will return a VersionService.CreateVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to create a versionproject
- The project object containing requested versionversionName
- The name of created versionreleaseDate
- The release date for a version (optional)description
- The description for a version (optional)scheduleAfterVersion
- The version after which created version should be scheduled (optional)@Deprecated Version createVersion(ApplicationUser user, VersionService.CreateVersionValidationResult request)
#validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4#validateCreateVersion(User, com.atlassian.jira.project.Project, String,
String, String, Long)
a new version will be created. This method will throw an RuntimeException if the version
could not be created.user
- The user trying to get a versionrequest
- The VersionService.CreateVersionValidationResult
object containing all required data@Nonnull VersionService.ReleaseVersionValidationResult validateReleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nullable Date releaseDate)
The method will return a VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to release a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Nonnull VersionService.ReleaseVersionValidationResult validateReleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nonnull String releaseDate)
The method will return a VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to release a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Nonnull VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nullable Date releaseDate)
The method will return a VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to unrelease a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Nonnull VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nonnull String releaseDate)
The method will return a VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.
user
- The user trying to unrelease a versionversion
- The version to releasereleaseDate
- The version release date (optional)Version releaseVersion(VersionService.ReleaseVersionValidationResult result)
#validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be released. This method will throw an IllegalArgumentException if the provied data are
invalid and version could not be released.result
- a ReleaseVersionValidationResult containg required datavoid moveUnreleasedToNewVersion(@Nullable ApplicationUser user, @Nonnull Version currentVersion, @Nonnull Version newVersion)
#validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be released. This method will throw an IllegalArgumentException if the provided data are
invalid and version could not be released.user
- The user trying to release a versioncurrentVersion
- The current version being released.newVersion
- The version to move issues to.Version unreleaseVersion(VersionService.ReleaseVersionValidationResult result)
#validateUnreleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be unreleased. This method will throw an IllegalArgumentException if the provied data are
invalid and version could not be unreleased.result
- a ReleaseVersionValidationResult containg required data@Nonnull VersionService.ArchiveVersionValidationResult validateArchiveVersion(@Nullable ApplicationUser user, @Nonnull Version version)
The method also validates that the user passed in is either a global admin, or has project admin rights for the project that the version is linked to.
Finally, this method checks that the version that was passed in hasn't already been archived. If there's any errors, the validationResult will contain appropriate errors and wont be valid.
user
- The user performing this operationversion
- The version to be archived@Nonnull VersionService.ArchiveVersionValidationResult validateUnarchiveVersion(@Nullable ApplicationUser user, @Nonnull Version version)
The method also validates that the user passed in is either a global admin, or has project admin rights for the project that the version is linked to.
Finally, this method checks that the version that was passed is currently archived. If there's any errors, the validationResult will contain appropriate errors and wont be valid.
user
- The user performing this operationversion
- The version to be archivedVersion archiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validationIllegalStateException
- if the result passed in is not valid.Version unarchiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validationIllegalStateException
- if the result passed in is not valid.boolean isOverdue(Version version)
version
- the version to check.@Nonnull VersionService.MoveVersionValidationResult validateMoveToStartVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Nonnull VersionService.MoveVersionValidationResult validateIncreaseVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Nonnull VersionService.MoveVersionValidationResult validateDecreaseVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Nonnull VersionService.MoveVersionValidationResult validateMoveToEndVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a versionVersionService.MoveVersionValidationResult validateMoveVersionAfter(@Nullable ApplicationUser user, long versionId, @Nonnull Long scheduleAfterVersion)
user
- The user trying to move a versionversionId
- version to reschedulescheduleAfterVersion
- id of the version to schedule after the given version objectvoid moveToStartVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid increaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid decreaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid moveToEndVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid moveVersionAfter(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultlong getFixIssuesCount(Version version)
long getAffectsIssuesCount(Version version)
@Nonnull Collection<CustomFieldWithVersionUsage> getCustomFieldsUsing(@Nonnull Version version)
version
- The version that we want to get information about.long getCustomFieldIssuesCount(@Nonnull Version version)
version
- The version that we want to get information about.long getUnresolvedIssuesCount(@Nullable ApplicationUser user, @Nonnull Version version)
user
- the user trying to get the countversion
- which version to check for unresolved issuesDeleteVersionWithReplacementsParameterBuilder createVersionDeletaAndReplaceParameters(@Nonnull Version versionToDelete)
versionToDelete
- version that will be deleted - mandatorydeleteVersionAndSwap(JiraServiceContext, DeleteVersionWithCustomFieldParameters)
ServiceResult deleteVersionAndSwap(@Nonnull JiraServiceContext serviceContext, @Nonnull DeleteVersionWithCustomFieldParameters parameters)
DeleteVersionWithCustomFieldParameters
version will be completly removed from specific fields are replaced.serviceContext
- The context for this service call.parameters
- parameters build with builder obtained by createVersionDeletaAndReplaceParameters(Version)
merge - if you want to replace all version references to given
version.
VersionBuilder newVersionBuilder()
Version
. The builder encapsulates all the fields which
need to be specified on create.for updating an existing version
,
for updating an existing version
VersionBuilder newVersionBuilder(Version version)
Version
. The builder encapsulates all the fields
which need to be specified on update.version
- the Version object to updatefor creating a new version
,
for creating a new version
@Nonnull VersionService.VersionBuilderValidationResult validateCreate(@Nullable ApplicationUser user, @Nonnull VersionBuilder versionBuilder)
Version
object, specified with a VersionBuilder
.
This replaces the deprecated methods: #validateCreateVersion(User, Project, String, Date, String, Long)
and #validateCreateVersion(User, Project, String, String, String, Long)
.
user
- the user who is performing the createversionBuilder
- the builder which specified the new Version to be creatednewVersionBuilder()
@Nonnull ServiceOutcome<Version> create(@Nullable ApplicationUser user, @Nonnull VersionService.VersionBuilderValidationResult validationResult)
Version
, based on the validation result from calling #validateCreate(User,
VersionBuilder)
.user
- the uservalidationResult
- the result of validation#validateCreate(com.atlassian.crowd.embedded.api.User, VersionBuilder)
,
#validateCreate(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
@Nonnull VersionService.VersionBuilderValidationResult validateUpdate(@Nullable ApplicationUser user, @Nonnull VersionBuilder versionBuilder)
Version
object, specified with a VersionBuilder
.
This replaces the deprecated methods: #validateReleaseDate(User, Version, String)
and #validateVersionDetails(User, Version, String, String)
.
user
- the user who is performing the updateversionBuilder
- the builder which specified the update to the existing VersionnewVersionBuilder(com.atlassian.jira.project.version.Version)
,
#newBuilder(com.atlassian.jira.project.version.Version)
ServiceOutcome<Version> update(ApplicationUser user, VersionService.VersionBuilderValidationResult validationResult)
Version
, based on the validation result from calling #validateUpdate(User,
VersionBuilder)
.user
- the uservalidationResult
- the result of validation#validateUpdate(com.atlassian.crowd.embedded.api.User, VersionBuilder)
,
#validateUpdate(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
Copyright © 2002-2021 Atlassian. All Rights Reserved.