プロジェクト キーの形式の変更
JIRA provides the ability to specify the format of project keys within the system. This allows you to restrict the format of a project key, when a project key is created or edited.
A project key format is defined via a regular expression 'rule' that governs the valid project key format. By default, the JIRA project key configuration requires two or more uppercase alphabetical characters — based on the regular expression ([A-Z][A-Z]+
).
はじめる前に
- Ensure that you choose a supported project key format. Only formats that meet all of the following rules are supported:
- 最初の文字はアルファベットにする必要があり、
- All letters used in the project key must be from the Modern Roman Alphabet and upper case, and
- 文字、数字、アンダースコア記号のみを使用できます。
例:- Examples of supported keys:
PRODUCT_2013
,R2D2
,MY_EXAMPLE_PROJECT
. - Examples of unsupported keys:
2013PROJECT
(first character is not a letter),PRODUCT-2012
(hyphens are not supported).
- Examples of supported keys:
- JIRA はこのキーが特定のルールを順守することを期待しているため、課題キーのパターンを設定することはできません。既定では、JIRA 課題キー (または課題 ID) の形式は<project key>-<issue number> です。例: ABC-123。 たとえば、プロジェクトキーの前に課題番号を示すことはできません。
- If a number of issues have already been created in your JIRA installation, then changing the project key format is not recommended. If you must change the project key pattern after issues have already been created, use a regular expression that allows a more 'permissive' project key pattern than the current one (e.g. use a regular expression which will still be valid for existing project keys defined in your JIRA installation).
If you use JIRA Agile and you are using the Classic Boards, do not change JIRA's default project key format as the Classic Boards only support this key format. If you are not using the Classic Boards, you can change to a supported project key format.
JIRA を Bamboo と統合した場合、JIRA の既定のプロジェクトキーの書式を変更しないでください。Bamboo でサポートされるのはこのキー形式のみです。
プロジェクトキーの形式の設定
The jira.projectkey.pattern
property allows JIRA administrators to specify a Perl5 regular expression value that defines the rule for a valid project key. Further information on Perl5 is available here.
This property and its regular expression value can be defined through the Advanced Settings page. This is described below.
手順 1.プロジェクトキー構文のパターンを設定します
- Navigate to the JIRA Advanced settings page, as described on Configuring Advanced Settings.
- Find the
jira.projectkey.pattern
property and click its value to modify it. Below is a list of common examples and patterns:
要求されたパターン | 必要な表現 | 結果の課題 ID | コメント |
---|---|---|---|
XXYY、ここで X は 2 つの固定された文字、Y は 2 つの固定された桁数を示す | ( | TQ09-01、TQ09-02、など。 |
|
XZ+、ここで X は 1 つの固定された文字、Z+ は 1 つ以上の文字、数字、またはアンダーバー記号を表す | ( | ACAT_51-1、AAA5-1330、A_20_A091-15、など。 |
|
注意:
- JIRA は指定された正規表現を先頭に「^」を付け、システム内の完全一致ルールには「$」で閉じます。
- The project key only supports uppercase characters, as stated above. Hence, for simplicity, use uppercase characters in your expressions as JIRA will convert any lowercase characters to uppercase ones.
ステップ 2. 正規表現のテスト
さまざまなツールによって、正規表現を使用した検索が可能です。ほとんどのテキストエディターでは、正規表現検索を許可しています。また、インターネット検索で利用可能な正規表現をテストできる、さまざまな Web サイトもあります。
(オプション) ステップ 3. プロジェクトキーの説明と警告をカスタマイズする
In addition to the project key format, you can also customize the following properties in the jira-config.properties
file:
jira.projectkey.description
— a configurable description (to match the project key pattern) displayed on project creationjira.projectkey.warning
— if JIRA detects that the project key entered does not match thejira.projectkey.pattern
, it will throw the error message defined injira.projectkey.warning
. You can change this error message, so that when a user keys in the wrong format, they will be informed of the correct pattern to use.
関連トピック
- 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.
- Editing a Project Key
- Defining a Project
- Configuring Advanced Settings