Pre-populate summary field

Hey guys,

I'm trying to populate the summary field in one issue type (not all), so that it does the following:

When users select "create issue" > "new starter form", the summary field will be pre-populated with "New Starter - Name - Due Date" (these aren't variables, or calculated entries, just standard text).

I've seen in that you can use a custom field to populate the summary field, but I can't seem to get this to work.

Any help would be great!



4 answers

try with the following code, if you want to copy value from the other fields to summary field

<script type="text/javascript">
jQuery(document).ready(function($) {
	JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
	function addSummary(){	
		var issueTypeCreate = $("#issuetype-field").val();
		var issueType = $("#issue-create-issue-type").text();
		if((issueTypeCreate != null && issueTypeCreate === "Bug") || issueType === "Bug"){
			//if you want hide summry field use this
				// use this if you want to copy value from select list field to summary field
				var selectList=$("#customfield_10407 option:selected").text();
				//or use this if you want to copy text field value to summary
				var textFieldVal=$("#customfield_13815").val();

is this what your looking for you?


Thank you for the assistance.

In regards to this, would I put this script in the summary field default value or in a custom message field (edit)?

Many thanks!

add the above script in custom field description in field configuration that issue type or you can add it to plugin as webresource module

check this post to know how to add it to plugin as web-resource module

Seems that didn't work unfortunately.

I did however, find another method of doing it:

<script type="text/javascript">
if (AJS.$("#summary").val().length <= 0){
AJS.$("#summary").val("New Starter - Starter Name - Start Date");

Does this still work for you (what version of JIRA are you currently utilizing)?  I thought they were moving away from allowing scripting in the description of the field.

Hi, I'm new at all this scripting and am trying to format the Summary field.

I have 2 fields which the user fills out and I want to use those values to pre-populate the Summary field. How do I have to modify the above code in order to get it to work? I have the following 2 fields:
1) JProject

I want the Summary field to be formatted with the words "Access Request" followed by the value in JProject followed by the value in ATID. Could someone please help while I try to learn javascript?



You'd probably better off in the long term keeping the 3 pieces of information separate in the issue type field, JProject and ATID fields. Then display them next to each other in the columns of the issue navigator.

If you paste them altogether into one field someone is only going to ask you to parse that field later on, which will be tedious. Store the info in one place only

If you really have to have a read-only calculated field to show this then use the Script Runner add-on (not available inOnDemand)


Hi Matt,

I did not know you could configure the Issue Navigator (I'm new at all of this). I'll look into it as it may be a good workaround for me.

Thank you for the suggestion.

I am trying to do the same thing, set the Summary from a custom field that is a select list.

I would like the summary to be what the selected text is.

I've looked at the above example and do not understand what I should change #SVNKitNPIProjectSelect to? I tried changing it to the name of the custom field and #customfield_10008 , but I cannot get it to work. The JavaScrpt runs up to the hiding of the summany.

Any insights would be appreciated.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,292 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you