Jira の要約フィールドに既定値を設定する方法

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 article contains a workaround to use HTML and/or Javascript in a field description in Jira Server/Data Center.  Due to changes made as a result of JRASERVER-70859 - Getting issue details... STATUS Jira 8.7.0 and higher versions no longer ship with this HTML enabled by default on new installs.  It is still possible to make this work in later versions, however a Jira System Administrator will need to turn ON the option called Enable HTML in custom fields descriptions and list item values.  See Configuring Jira application options for details on this setting.

More information about this change can be found in https://confluence.atlassian.com/jirasoftware/jira-software-8-7-x-upgrade-notes-987138245.html

要約

Summary is a required field in Jira issue creation and there is no default way user can set a default way for issue Summary field. This workaround will help user to inject a default value via JavaScript.

回避策

このページで提供される回避策には、カスタム JavaScript の使用が含まれます。このようなカスタマイズやスクリプト作成はアトラシアン サポートのサポート対象外です。コードを本番環境インスタンスに適用する前にテストを行うことを強くおすすめします。

  1. For Jira versions 8.7.0 and above only, you will need to enable the setting Enable HTML in custom fields descriptions and list item values by following the steps below. (warning) Please take note of the impact of enabling this setting, which is explained in the information panel at the top of this article.
    1. Go to ⚙ > System > General Configuration
    2. Click on Edit Settings
    3. Turn ON the setting Enable HTML in custom fields descriptions and list item values
    4. Click on Update at the bottom of the page
  2. 対象のプロジェクトの [フィールド構成] に移動します。
  3. [要約] フィールドを見つけます。
  4. [編集] をクリックします。
  5. フィールドの [説明] に次の JavaScript を挿入します。

    <script type="text/javascript">
    if (document.getElementById("summary").value == "") {
    document.getElementById("summary").value = "<Default Value for Summary>\n";}
    </script>

    (info) <Default Value for Summary> を、課題の要約フィールドに設定したい既定値で置き換えます。

最終更新日 2022 年 4 月 26 日

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

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