Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66518

JIRA Status is reported as "No associated workflows" while it's still used

      Summary

      JIRA Status at Statuses page shows "No associated workflows", if you tried to Delete the status, you will get following error: Given status is currently associated with a workflow(s) and cannot be deleted .
      It's not clear if status is used or not. In this case status is used, but Statuses page shows incorrect data.

      Steps to Reproduce

      1. Create status status1 and associate with workflow Workflow1
      2. Edit workflow_Workflow1_ and remove status status1
        • Normally this is not possible as JIRA would not allow removing statuses from active workflow
      3. Don't safe the Workflow1 and keep the draft
      4. Navigate to [ Admin > Issues > Statuses ]
      5. Check status for status1

      Expected Results

      Status has 1 associated workflow

      Actual Results

      No associated workflows

      Notes

      • If you proceed with Delete, you will get following error: Given status is currently associated with a workflow(s) and cannot be deleted
      • The problem is caused by chain of factors
        1. Initial Workflow1 had status1
        2. Workflow1 was edited and draft was not saved
        3. The draft workflow doesn't have status1
        4. During computation of workflows for statuses draft workflow is used, so JIRA couldn't detect the status.

      Workaround

      To fix the problem, please follow the steps below:

      1. Check status in workflows tables running the SQL query below:
        select id,workflowname from jiraworkflows where descriptor like '%status1%';
        select parentname from jiradraftworkflows where descriptor like '%status1%';
        
        • Take note on the workflow name from the output.
      2. Go to the workflow page and edit the workflow.
      3. Discard or publish the draft workflow and then we will see the status associated with the workflow.

            [JRASERVER-66518] JIRA Status is reported as "No associated workflows" while it's still used

            Viktoria added a comment -

            Same issue for 9.12.15 version

            Viktoria added a comment - Same issue for 9.12.15 version

            Listing the jiradraftworkflows table, Jira does not show the 60+ drafts that are there.
            At least not in our Jira version, 9.12.0. 

            Two options for cleaning:

            • Edit the workflow, creating a draft Jira knows about
              Discard this draft.
            • Remove the drafts in the database and restart Jira
              Untested, use at own risk.

            Tiemco de Jong added a comment - Listing the jiradraftworkflows table, Jira does not show the 60+ drafts that are there. At least not in our Jira version, 9.12.0.  Two options for cleaning: Edit the workflow, creating a draft Jira knows about Discard this draft. Remove the drafts in the database and restart Jira Untested, use at own risk.

            TPE added a comment -

            In my case the query
            define status = 'Klaar voor productie'
            select id,workflowname from jiraworkflows where descriptor like '%&status%';
            select parentname from jiradraftworkflows where descriptor like '%&status%';
             
            shows that the status is actually in use by one of the project workflows.
             
            The JQL query also shows the status as connected to 1 issue.
            status =  'Klaar voor productie'
             
            How can this be?
            Should I create a support ticket for this?
            We have 400 statuses of which 50 are shown as "No associated workflows", while the Delete says there are associated workflows.

            TPE added a comment - In my case the query define status = 'Klaar voor productie' select id,workflowname from jiraworkflows where descriptor like '%&status%'; select parentname from jiradraftworkflows where descriptor like '%&status%';   shows that the status is actually in use by one of the project workflows.   The JQL query also shows the status as connected to 1 issue. status =  'Klaar voor productie'   How can this be? Should I create a support ticket for this? We have 400 statuses of which 50 are shown as "No associated workflows", while the Delete says there are associated workflows.

            Brent Nye added a comment -

            Still an issue in 8.20.10. Would be great if this were resolved.

            Brent Nye added a comment - Still an issue in 8.20.10. Would be great if this were resolved.

            Affecting my team also on 8.20.6.
            This problem confuses the management of statuses and workflows and it's a shame that there isn't already JUST a message to say that this status is in a draft workflow. 
            And of course the best solution is to put on the page, the workflow on draft who included this status !

            Paul FLYE SAINTE MARIE added a comment - Affecting my team also on 8.20.6. This problem confuses the management of statuses and workflows and it's a shame that there isn't already JUST a message to say that this status is in a draft workflow.  And of course the best solution is to put on the page, the workflow on draft who included this status !

            still in version 8.20.1

            Removing inactive workflows does not always do the trick.

            Job Wolters added a comment - still in version 8.20.1 Removing inactive workflows does not always do the trick.

            also 8.8.1

            Renni Verho added a comment - also 8.8.1

            Omid H. added a comment -

            also 8.5.3

            Omid H. added a comment - also 8.5.3

            Also 8.5.0

            arshad.havaldar added a comment - Also 8.5.0

            Also 7.11

            HenrikLynggaardHansen added a comment - Also 7.11

            Affects Version v7.3.1 as well

            Alexander Schmidt added a comment - Affects Version v7.3.1 as well

            Hey mdoar2

            Does simply deleting all inactive workflows also clear this problem?

            It might, but we don't documented way to do that.

            Andriy Yakovlev [Atlassian] added a comment - Hey mdoar2 Does simply deleting all inactive workflows also clear this problem? It might, but we don't documented way to do that.

            Matt Doar added a comment -

            Does simply deleting all inactive workflows also clear this problem?

            Matt Doar added a comment - Does simply deleting all inactive workflows also clear this problem?

              Unassigned Unassigned
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Affected customers:
              37 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated: