public interface WorkflowMigrationResult extends Serializable
The result could be either SUCCESS
or TERMINATED
. This object also communicates
if there were any errors detected before migrating any issues to the new workflow or
the number of issues that failed during migration. If there were failed issues, this object contains the issue
ids and keys of failed issues.
The workflow migration is made to tolerate several failures. This ensures that if migrating a project with a large number of issues and only a few (a number lower than an agreed threshold) of them fail, the migration proceeds and does not leave the project in an inconsistent state.
Therefore, even if the result is SUCCESS
, the object could contain information about one or more failed
issues. To determine the number of failed issues, call getNumberOfFailedIssues()
method. To get a
Map
of issue ids to issue key mappings call getFailedIssues()
method.
If there were no failures, (a perfect migration). The getNumberOfFailedIssues()
method will return 0 and the
getFailedIssues()
method will return an empty map.
If the result is SUCCESS
the object should never have any error messages. Error messages
are detected before the migration begins. If any errors are detected a TERMINATED
result code should be
returned.
If the result is TERMINATED
, then the object can either contain one or more errors that were detected
before any of the issues were migrated, or no errors and one or more failed issues.
At no time can the object have errors as well as failed issues.
If TERMINATED
is returned and the object contains one or more errors, then the migration did not
actually occur as there were errors found with the data before migrating any issues.
If failed issues are returned, then no errors were found before the migration, but the migration terminated before completion as there were too many failures (more failures than the agreed threshold). In this case, the project is likely left in an inconsistent state and users should be warned.
Modifier and Type | Field and Description |
---|---|
static int |
SUCCESS
The workflow migration has succeeded.
|
static int |
TERMINATED
The workfow migration either did not occur as there were problems found with the data before
starting the migration.
|
Modifier and Type | Method and Description |
---|---|
ErrorCollection |
getErrorCollection()
Returns a collection of errors that were found before starting the migration.
|
Map<Long,String> |
getFailedIssues()
A
Map of issue ids to issue keys of failed issues. |
int |
getNumberOfFailedIssues()
The number of issues that failed during the migration, or until the migration was terminated.
|
int |
getResult()
Returns the result of the workflow migration.
|
static final int SUCCESS
getNumberOfFailedIssues()
and getFailedIssues()
.static final int TERMINATED
getErrorCollection()
.
Otherwise, the migration could have been stopped before completion as too many failures were encountered.
In this case getNumberOfFailedIssues()
should return a positive number and getFailedIssues()
should return the issue ids and issue keys.
int getResult()
SUCCESS
or TERMINATED
ErrorCollection getErrorCollection()
int getNumberOfFailedIssues()
getNumberOfFailedIssues()
). Or the number of failures during the migration, or until the
migration was terminated.Map<Long,String> getFailedIssues()
Map
of issue ids to issue keys of failed issues.getNumberOfFailedIssues()
is 0 or a mapping of issue id to issue key
for every failed issue during the migration.Copyright © 2002-2023 Atlassian. All Rights Reserved.