JIRA should automatically detect duplicated drafts of workflows and delete the duplicate.
When the creation of a duplicated draft of a workflow occurs in the database, trying to edit the workflow or create another draft results in 500 errors.
It's not certain how to reproduce this or what exactly causes the duplication of the drafts.
There's some hints on the cause being around concurrent uses of the workflows' editing feature. However, a test recently performed on our side returned no more than some 404 errors when two people were editing the same workflow.
Run the below query to find out whether you have duplicated drafts or not and also what workflows are affected by this.
Run the below query to delete the duplicated drafts.
Make sure you have an up-to-date backup of JIRA's database before performing any manual data manipulation.