カスタム Jira 課題キーを Bitbucket Server で使用する
Bitbucket Server assumes that Jira Software issue keys are of the default format (that is, two or more uppercase letters ([A-Z][A-Z]+
), followed by a hyphen and the issue number, for example TEST-123). By default, Bitbucket Server will not recognize custom issue key formats.
Bitbucket Server でカスタムの課題キー形式を使用できますが、Jira Software との連携は、両方のアプリケーションで既定の課題キー形式が使用されているかどうかが影響する可能性がある点にご注意ください。詳細は、「カスタムの Jira Software 課題キーを使用した連携」を参照してください。
Configure Bitbucket Server to recognize custom issue key formats by editing <Bitbucket Server installation directory>/bin/_start-webapp.sh
(on Windows, _start-webapp.bat
).
To override the default issue key format, use the JVM_SUPPORT_RECOMMENDED_ARGS
property, like this:
JVM_SUPPORT_RECOMMENDED_ARGS="-Dintegration.jira.key.pattern=\"(<Some different regex>)\""
Bitbucket Server を再起動する必要があります。
たとえば、課題キーで小文字を使用するには、次のようなパラメーターで regex を使用します。
'-Dintegration.jira.key.pattern=(?<=^|[a-z]-|[\s\p{Punct}&&[^-]])([a-z]{1,10}-\d+)(?![^\W_])'
「Jira Software 課題キーの再インデックス」も参照してください。
Bitbucket Server で手動操作を実行する前には必ず、ホーム ディレクトリ (およびデータベース) のバックアップを作成するようにします。本番環境で使用する前に、Bitbucket Server の別のコピーでこの変更をテストすることをご検討ください。