com.atlassian.jira.bc.project.version
Interface VersionService

All Known Implementing Classes:
DefaultVersionService

public interface VersionService

Service for VersionService

Since:
v3.13

Nested Class Summary
static interface VersionService.ValidationResult
          Represents the results of performing a validation call for a single merge or delete operation.
static interface VersionService.VersionAction
           
 
Field Summary
static VersionService.VersionAction REMOVE
          Indicates that the Version should be removed from affected issues.
 
Method Summary
 void delete(JiraServiceContext context, VersionService.ValidationResult result)
          Deletes a version from a project.
 void merge(JiraServiceContext context, VersionService.ValidationResult result)
          Merges a version into another, then removes the original version.
 VersionService.ValidationResult validateDelete(JiraServiceContext context, Long versionId, VersionService.VersionAction affectsAction, VersionService.VersionAction fixAction)
          Validates an attempt to delete a version from a project.
 VersionService.ValidationResult validateMerge(JiraServiceContext context, Long versionId, Long swapVersionId)
          Validates an attempt to merge a version into another.
 

Field Detail

REMOVE

static final VersionService.VersionAction REMOVE
Indicates that the Version should be removed from affected issues.

Method Detail

validateDelete

VersionService.ValidationResult validateDelete(JiraServiceContext context,
                                               Long versionId,
                                               VersionService.VersionAction affectsAction,
                                               VersionService.VersionAction fixAction)
Validates an attempt to delete a version from a project. When deleting a version, we need to decide what to do with issues that reference the version in their Affects of Fix Version fields. The action taken is specified as a flag for each field.

Parameters:
context - 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
Returns:
a 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

delete

void delete(JiraServiceContext context,
            VersionService.ValidationResult result)
Deletes a version from a project. When deleting a version, we need to decide what to do with issues that reference the version in their Affects of Fix Version fields. The action taken is specified as a flag for each field.

Parameters:
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 fields

validateMerge

VersionService.ValidationResult validateMerge(JiraServiceContext context,
                                              Long versionId,
                                              Long swapVersionId)
Validates an attempt to merge a version into another. Merging is essentially the same as Deleting with the actions set to VersionKeys.SWAP_ACTION.

Parameters:
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.
Returns:
a 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

merge

void merge(JiraServiceContext context,
           VersionService.ValidationResult result)
Merges a version into another, then removes the original version.

Parameters:
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 fields


Copyright © 2002-2008 Atlassian. All Rights Reserved.