How to set default value for Summary field in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

*Except Fisheye and 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

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.

Workaround

The provided workaround involves using custom Javascript. Customizations and scripting like this is out of scope for Atlassian Support. Please ensure to test your code before applying to production instances.

  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. Go to the respective Field Configuration of the project.
  3. Find for the Summary field.
  4. Click on Edit.
  5. Input the following JavaScript at the Description of the field:

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

    (info) Replace <Default Value for Summary> with the desired default value for the Issue Summary field.

Last modified on Apr 26, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.