Issue status is not valid for issues workflow

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

The following error may appear while using the Jira database integrity checker to look for integrity issues in workflow step entries:

1 The issue with key <ISSUE_KEY> has a status of <SOME_STATUS> which is not valid status for issues workflow.

Cause

There are a number of possible causes: a corrupted workflow, an issue that is using an non-existent workflow, etc. It is also known for automation rules (Automation for Jira) modifying the Issue Type field when these Issue types use different workflows, as described in the following bug: JIRAAUTOSERVER-849 - Changing Issue type in projects through automation does not change the underlying workflow in Database

Resolution

To resolve this problem, find a valid issue status name in your project workflow and then update the database manually to set that status on the failing issue.

Getting a valid issue status name for a workflow

To get a valid issue status name:

  1. From the app header, select Administration () > Projects.

  2. Select the project containing the failing issue.

  3. From the left menu, select Workflows.

  4. Select the relevant issue type.

  5. Take note of the name of the issue status that you want to set for the failing issue.

Updating the database

To update the database:

  1. Find the ID of the status to set on the failing issue by running the following query on your instance database, where <STATUS_NAME> is the name of the issue status valid for your workflow:

    1 SELECT * FROM ISSUESTATUS WHERE PNAME='<STATUS_NAME>'
  2. Take note of the value from the ID column.

  3. Stop your Jira instance.

  4. Update the status of the failing issue by running the following query on your instance database, where <ID> is the value found in step 1, and get only the number <ISSUE_NUMBER> from the <ISSUE_KEY> is the key from the error message. The <PKEY> is the project and you can get that from the <ISSUE_KEY> letters part:

    1 UPDATE JIRAISSUE SET ISSUESTATUS=<ID> WHERE ISSUENUM IN (<ISSUE_NUMBER>) AND PROJECT = (SELECT ID FROM PROJECT WHERE PKEY='<PKEY>');

    For example if the <ISSUE_KEY> is JRA-14 and <ID> is 10000, see the below SQL replacing the <ID>, <ISSUE_NUMBER> ,and <PKEY>:

    1 UPDATE JIRAISSUE SET ISSUESTATUS=10000 WHERE ISSUENUM IN (14) AND PROJECT = (SELECT ID FROM PROJECT WHERE PKEY='JRA');
  5. Start Jira.

  6. Run the workflow current step entries integrity check.

    The updated issue should have a valid status and no longer appear in the results of the integrity check.

Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.