com.atlassian.jira.web.action.admin.workflow.WorkflowMigrationResult |
Known Indirect Subclasses |
This class communicates the results of migrating a project to a new workflow scheme.
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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | SUCCESS | The workflow migration has succeeded. | |||||||||
int | TERMINATED | The workfow migration either did not occur as there were problems found with the data before starting the migration. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a collection of errors that were found before starting the migration.
| |||||||||||
A
Map of issue ids to issue keys of failed issues. | |||||||||||
The number of issues that failed during the migration, or until the migration was terminated.
| |||||||||||
Returns the result of the workflow migration.
|
The workflow migration has succeeded. However, there could still have been failures migrating
several issues. See getNumberOfFailedIssues()
and getFailedIssues()
.
The workfow migration either did not occur as there were problems found with the data before
starting the migration. In this, there will be one or more errors. See 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.
Returns a collection of errors that were found before starting the migration.
A 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.
The number of issues that failed during the migration, or until the migration was terminated.
getNumberOfFailedIssues()
). Or the number of failures during the migration, or until the
migration was terminated.
Returns the result of the workflow migration.
SUCCESS
or TERMINATED