Jira Software のカスタム フィールドのロックを解除する

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

This KB article provides changes that are out of the scope of Atlassian Support and, therefore, is provided as-is. The steps are only meant to fix problems within Jira, and not necessarily to be used for any locked fields. Consult with Atlassian support before following the steps listed here. Altering locked system fields can introduce unintended side effects in Jira (such as the inability to pre-populate fields during Issue creation) if unexpected changes are made to default fields, such as adding Translation Text to fields that do not permit this by default.


症状

Jira Software のロックされたフィールドのロックを解除する必要がある場合があります。

原因

フィールドは、Jira Software を破壊してしまうような意図せぬ変更を防止するためにロックされています。Jira Software の特定の問題により、フィールドを調整するために手動でロック解除する必要がある場合があります。

ソリューション

If you have ScriptRunner installed, it is possible to unlock fields without a restart using the Groovy Scripts described in: Unlock a locked Jira custom field using ScriptRunner


データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. データベースに対して次のクエリを実行し、Jira Software のカスタム フィールド ID を確認します。

    SELECT id,customfieldtypekey,cfname from customfield where customfieldtypekey like 'com.pyxis.greenhopper.jira%';

    次のような結果が返されます。

      id   |                         customfieldtypekey                         |         cfname
    -------+--------------------------------------------------------------------+-------------------------
     10204 | com.pyxis.greenhopper.jira:gh-global-rank                          | Rank
     10205 | com.pyxis.greenhopper.jira:gh-sprint                               | Sprint
     10206 | com.pyxis.greenhopper.jira:gh-epic-link                            | Epic Link
     10207 | com.pyxis.greenhopper.jira:gh-epic-label                           | Epic Name
     10208 | com.pyxis.greenhopper.jira:gh-epic-status                          | Epic Status
     10209 | com.pyxis.greenhopper.jira:gh-epic-color                           | Epic Colour
     10211 | com.pyxis.greenhopper.jira:greenhopper-releasedmultiversionhistory | Release Version History
  2. managedconfigurationitem テーブルの item_id コラムの該当するエントリを参照し、ロックを解除したいフィールドの id を一致させる必要があります。

    SELECT * from managedconfigurationitem;
      id   |      item_id      |  item_type   | managed | access_level |                       source                       |      description_key
    -------+-------------------+--------------+---------+--------------+----------------------------------------------------+----------------------------
     10000 | customfield_10204 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10001 | customfield_10205 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10002 | customfield_10206 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10003 | customfield_10207 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10004 | customfield_10208 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10005 | customfield_10209 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
  3. ロックを解除したいすべてのフィールドの managed 列を false に設定する必要があります。たとえば、次の例は Epic Status と Epic Colour をアンロックします。

    UPDATE managedconfigurationitem set managed='false' where item_id in ('customfield_10208','customfield_10209');

    注: 上述の変更のあと、"access_level" 列は "LOCKED" 値のままになりますが、カスタム フィールドは UI でロック解除されます。

    Oracle データベースを使用している場合、変更をコミットするのを忘れないようにします。

  4. フィールドに必要な変更を加えます。
  5. managed 列を true に設定して、ロックを解除したフィールドをロックします。たとえば、次の例は Epic Status と Epic Colour をロックします。

     UPDATE managedconfigurationitem set managed='true' where item_id in ('customfield_10208','customfield_10209');

    Oracle データベースを使用している場合、変更をコミットするのを忘れないようにします。

これらのフィールドは起動時に、プラグイン内の自動タスクによって再びロックされます。

説明 Jira Software のロックされたフィールドのロックを解除する必要がある場合があります。フィールドは、Jira Software を破壊してしまうような意図せぬ変更を防止するためにロックされています。Jira Software の特定の問題により、フィールドを調整するために手動でロック解除する必要がある場合があります。
製品Jira
プラットフォームServer
最終更新日 2022 年 9 月 29 日

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

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