Skip to main content

Migrating issues when modifying priority schemes

How to migrate issues when deploying a priority scheme change that removes priorities still in use

Written by Rotem Cohen

Notice: this article is relevant for Jira Cloud environments only.

When modifying an existing Jira priority scheme, an issue migration might be necessary. This happens when the change removes priorities from the scheme that are still used by issues in projects associated with the scheme. When migrating issues, users have to choose a new priority for each removed priority.

When using Salto to deploy a priority scheme change which requires migration, you will get the following warning: "Priority scheme change requires issue migration". This means that you have to specify some NACL code which instructs Salto how to do the migration. If you continue without it, the deployment will fail if any issues use the removed priorities.

To do this, edit the target priority scheme element NACL (using the "Edit" button during deployments from environments) and add this code at the top of the element (below the jira.PriorityScheme <instanceName> line):

prioritiesMigration = [
{
priorityId = jira.Priority.instance.High
newPriorityId = jira.Priority.instance.<NEW_PRIORITY>
},
]

Each {} object specifies how Jira should migrate issues: transform all issues that currently use the removed priority priorityId to the new priority newPriorityId, which must be part of the modified scheme.

The warning message already lists an entry for each removed priority — you should only complete the missing newPriorityId values.

Did this answer your question?