Multiple entries for the same issue type under "Default Issue Type Scheme"

お困りですか?

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

コミュニティに質問

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

問題

There are multiple entries for the same issue type on the Default Issue Type Scheme and it is not possible to delete or remove those through the interface.

診断

Run this query to confirm there are duplicate issue types on the Default Issue Type Scheme. It will show how many entries exist for each issue type.

SELECT COUNT(oc.id), it.pname FROM optionconfiguration oc JOIN issuetype it ON oc.optionid = it.id WHERE oc.fieldconfig = '10000' GROUP BY it.pname HAVING COUNT(it.id) > 1;

原因

Unknown, at the moment. It could be caused by direct manipulation of JIRA's database or any other kind of data corruption.

ソリューション

  1. Jira をシャットダウンします。
  2. Check for the highest ID among the multiple entries:

    SELECT it.pname, MAX(oc.id) FROM optionconfiguration oc JOIN issuetype it ON oc.optionid = it.id WHERE oc.fieldconfig = 10000 GROUP BY it.pname HAVING count(it.id) > 1;
  3. Delete entries with those IDs from the optionconfiguration table:

    DELETE FROM optionconfiguration WHERE id IN (SELECT MAX(oc.id) FROM optionconfiguration oc JOIN issuetype it ON oc.optionid = it.id WHERE oc.fieldconfig = 10000 GROUP BY it.pname HAVING count(it.id) > 1);

    It is extremely important that you must take a snapshot/backup of the database prior to executing the DELETE queries onto the production database.

  4. Repeat steps 2 and 3 until step 1 returns an empty set. 
    (info) This is required in some cases where we have more than 2 entries for each issue type;
  5. Start JIRA and check if the multiple entries are gone;

最終更新日 2018 年 5 月 9 日

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

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