Skip to main content
Migrating issues when modifying workflows
Lior Neudorfer avatar
Written by Lior Neudorfer
Updated over 10 months ago

When modifying an existing Jira workflow, an issue migration might be necessary. This happens when there are existing issues with statuses that do not appear in the modified 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 which requires migration, you will get the following warning: "Workflow change requires issue migration". This means that you have to specify some 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:

statusMappings = [
{
issueTypeId = jira.IssueType.instance.Epic
projectId = jira.Project.instance.helpdesk@s
statusMigrations = [
{
oldStatusReference = jira.Status.instance.done
newStatusReference = jira.Status.instance.<statusName>
}]
},
{
issueTypeId = jira.IssueType.instance.Bug
projectId = jira.Project.instance.helpdesk@s
statusMigrations = [
{
oldStatusReference = jira.Status.instance.done
newStatusReference = jira.Status.instance.<statusName>
}]
},
{
issueTypeId = jira.IssueType.instance.HelpRequest
projectId = jira.Project.instance.helpdesk@s
statusMigrations = [
{
oldStatusReference = jira.Status.instance.done
newStatusReference = jira.Status.instance.<statusName>
}]
},
]

Each {} object specifies how Jira should migrate issues: transform all issues from a specific projectId and issueTypeId, which are in a specific status oldStatusReference, to the new status newStatusReference which should be in the new workflow.

You should only complete the missing newStatusReference values.

Did this answer your question?