Duplicate workflow drafts results in 500 errors when editing an affected workflow

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When creating a draft workflow (invoking the Edit mode of a workflow which has a duplicated draft), a stack trace containing a message like this following is returned to the web browser:

java.lang.IllegalStateException: There are more than one draft workflows associated with the workflow named 'Workflow Name'

原因

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.

The below bug was raised to our development and product management teams to study possible ways to resolve this.

JRA-40009 - 課題詳細を取得中... ステータス

診断

Run the below query to find out whether you have duplicated drafts or not and also what workflows are affected by this.

SELECT
    COUNT(*) AS    "# of Drafts",
    parentname AS "Workflow",
    MAX(id) AS "Duplicate"
FROM
    jiradraftworkflows
GROUP BY
    parentname
HAVING
    count(*) > 1;

回避策

Run the below query to delete the duplicated drafts.

データベースを変更する前には必ずデータをバックアップするようにします。

DELETE FROM jiradraftworkflows WHERE id IN (
    SELECT max(id) FROM jiradraftworkflows GROUP BY parentname HAVING count(*) > 1);
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.