Editing a Project Key

プロジェクト キーの編集は簡単な作業ではありません。プロジェクトを作成する際は、プロジェクトの作成後にプロジェクト キーを編集する前提で行うのではなく、長期的な要件に合うキーを選択してください。ただし、次のような状況では既存のプロジェクト キーを変更する必要があります。例: 製品名の変更。

The instructions on this page show you how to change the project key and describe the implications of such a change. If you are a plugin developer, you should also read the developer notes below.

はじめる前に

  • Your desired project key must conform to the project key format restrictions specified in JIRA. By default, the project key format must be at least 2 characters long and contain only uppercase letters.

  • Perform this change during a low usage period — JIRA will start a  background re-index when you save your updated project key. This can have a performance impact on your instance. Note, you cannot choose a 'Lock JIRA and rebuild index'. The background index will be faster anyway, as it is limited to issues for the project.
  • Communicate changes to your users — Ensure that you are aware of the consequences of changing the project key, and have adequately prepared your users for the changes. See the Changes section below.

プロジェクト キーの編集

  1. Navigate to the desired project in JIRA, and access the project administration screen. Choose Project Administration (bottom of the project navigation sidebar) if you're on the Project summary screen.
  2. Choose the Edit Project button.
  3. Choose edit key next to the Key field.
  4. Update the key and choose Update.

注意:

  • If you updated other fields on the 'Edit Project' page as well, you will see the changes after you save your changes. You won't need to wait for the re-index to finish.
  • Don't cancel the background re-index. If you cancel it, then you will have problems searching for issues related to the project. If you do need to cancel it, you can run it again later to fix these problems.

更新後のタスク

  • Fix the project entity links — When you connected JIRA to another Atlassian application, entity links would have been automatically created between your JIRA projects and the relevant "projects" in other applications, e.g. Confluence spaces. If you change the key of a JIRA project, you will need to fix the project entity links as described on Creating links between projects.

変更管理の注意事項

プロジェクトキーの編集はメジャーですが、ほとんどの場合、JIRA プロジェクトは新しいキーを使用すると期待通り動作しません。認識しておくべきいくつかのケースを次に示します。これらの内容を確認し、適宜ユーザーにアドバイスすることをお勧めします。

  • 古いプロジェクト キーは JQL クエリで使用可能 — ユーザーは、古いプロジェクト キーを参照する課題フィルターを更新する必要はありません。
  • Confluence と JIRA を使用している場合、Confluence の JIRA 課題マクロは引き続き動作します。変更をすぐに確認できない場合は、キャッシュが更新されるまでしばらくお待ちください。
  • 古いプロジェクト キーを使用して新しいプロジェクトを作成することはできません。ただし、名前を変更したプロジェクトを古いプロジェクト キーに戻すように変更することはできます。プロジェクトを削除すると、関連付られたすべてのキーが解放され、再使用できるようになります。
  • リンクは、JIRA 内か外部ソースからどうかに関わらずリンクは作動します。ただし、リンクの別名は更新されません — たとえば、課題の説明で課題「EXAMPLE-1」へのリンクがあり、プロジェクトキー「EXAMPLE」から「DEMO」に変更するお、別名は「EXAMPLE-1」から「DEMO-1」には更新されません。ただし、リンクは引き続き DEMO-1 にダイレクトされます。
  • If you are using the Activity Stream gadget with a global filter, you will need to update the filter after the project is renamed.
  • All attachments will be accessible after the project key change. Please note however, that the directory they are stored in (under the <JIRA Home>\data\attachments directory) will retain the old project key. For example, if you change a project's key from TEST to DEMO, the attachments will be stored under <JIRA Home>\data\attachments\TEST.
  • If you export a renamed project, and then import it, it will have the updated project key, i.e. the original project key will not be retained. In fact, all historical keys for that project will be removed. There is a workaround for this that involves changing data directly in your database, see this Answers post.

関連トピック

Changing the maximum project key length — You can change the maximum characters allowed for a project key. Navigate to the General Configuration page of the JIRA administration console, as described on Configuring JIRA Options, and change the Maximum project key size field.

開発者向けの注意事項

  • REST API calls will still work with old project key — REST calls that specify an issue key will work with the old issue key after the project key has changed. For example, /rest/api/issue/EXAMPLE-100 will still work after the project key is changed from EXAMPLE to DEMO.
  • 新しいイベント、ProjectUpdatedEvent を作成しました。このイベントはプロジェクトの詳細が変更されるたび (プロジェクト キーの変更を含む) にトリガーされます。
  • すべての課題キーおよびプロジェクト キー (過去および現在) を取得する必要がある場合は、次の方法で実行できます。
    • REST:
      • Get all project keys for a project: /rest/api/2/project/<project key>?expand=projectKeys
    • Java API:
      • Get all project keys: com.atlassian.jira.project.ProjectManager#getAllProjectKeys
      • Get all issue keys for an issue: com.atlassian.jira.issue.IssueManager#getAllIssueKeys
最終更新日 2019 年 11 月 21 日

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

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