Skip to main content
All CollectionsSalto for JiraGuides
Migrating issues when modifying workflow schemes
Migrating issues when modifying workflow schemes
Support avatar
Written by Support
Updated over a year ago

When changing a workflow in a Jira workflow scheme, an issue migration might be necessary. This happens when there are existing issues with statuses that do not appear in the new workflow. When migrating issues, users have to choose a new status for each issue type and current status.

When using Salto to deploy a change to a workflow scheme which requires migration, you will get the following warning: "Workflow scheme change requires issue migration". This means that Salto can deploy your change, but won't finalize and publish it until you go into Jira and perform the migration process by yourself. If you choose to proceed, Salto will show you a reminder to publish the change after the deployment is done.

Alternatively, you can avoid this manual action by writing NACL code which instructs Salto how to do the migration. To do this, edit the target workflow scheme element NACL (using the "Edit" button during deployments from environments) and add this code:

statusMigrations = [
{
issueTypeId = jira.IssueType.instance.<SOME ISSUE TYPE A>
statusId = jira.Status.instance.<CURRENT STATUS B>
newStatusId = jira.Status.instance.<THE REQUIRED STATUS C>
},
{
issueTypeId = jira.IssueType.instance.<SOME ISSUE TYPE>
statusId = jira.Status.instance.<ANOTHER STATUS>
newStatusId = jira.Status.instance.<THE REQUIRED STATUS>
},
...
]

Each {} object specifies how Jira should migrate issues: transform all issues from a specific type (A), which are in a specific status (B), to the new status (C) which should be in the new workflow.

For example, when changing a workflow scheme to a new workflow which doesn't include the "Being Reviewed" status, you may want to move all the Bug issues which are Being Reviewed to the ToDo status instead.
To do that, include the following object in the statusMigrations list:

{
issueTypeId = jira.IssueType.instance.Bug,
statusId = jira.Status.instance.InReview
newStatusId = jira.Status.instance.ToDo
}

Did this answer your question?