How to pre-populate a required field on issue create

Bradley Kyer July 26, 2011

We are using the "Description" field on all our issue types. This field is Required. On a new issue type they do not want the Description field but since this screen uses the same Field Configuration, then JIRA is forcing me to add the Description field to the new issue type screen.

I hate to go through the process of creating another Field Configuration / Field Configuration Scheme just for this one field. So, is there a way to initialize or otherwise pre-populate some specified text into the Description field during the Create New Issue process so that the user does not have to key any thing in the field?

I tried editing the Create workflow step to add a Post Function and selected the "Update Issue Field" option, but it did not put the text I gave it into the Description field. It failed to create the issue stating that Description is required.

Any options?

Thanks,

Brad.

9 answers

1 accepted

1 vote
Answer accepted
Markus Lepper
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2011

Hi Brad,

OK: In case you want some content filled on the "Create" screen (BEFORE the issue gets created initially) I do not know any soluttion for default fields (like 'Description').

# For custom fields you could use the 'Custom Fields > your field > Configure > Default value'. #

* You may use the description-box of the 'Description"-field to inform your users:

"Please do not enter text here as it will be pre-filled during issue-creation."

* Or maybe change the Jira code itself which creates the "new issue" screen...but this is risky and not the preferred way.

* Finally I suppose you need to create another custom field and field configuration and adding the text via default option (see ## from above).

BR, Markus

2 votes
Artesa August 16, 2019

Hi all, I would like to ask you if someone solved problem with pre-populated description not by issue type but by issue components or somethink like this.

Let me explain my problem.

When I create an issue and the issue type = request, then i need to choose the issue component and then by selected component automatically fill me description.

 

I tried google something but this problem I not found.

 

Thank you for your reply.

Michal Krajnak November 19, 2020

Hello @Artesa 
Try Jira Project Automation for this.

2 votes
Markus Lepper
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2011

Hi Brad,

I've just tested it to work with adding the post function "Update Issue Field" inside the Create Event.

What is your order of post actions?

BR,Markus

Bradley Kyer August 15, 2011

Hi Markus,

I edit the Create step of my workflow, then I add the Post Function as shown below. What is happening is that when I press the "Create" button it fails stating that Description is Required. My text from the post function does not go into the field until I enter any other text in Description, like "x" to satisfy the Required field and allow the issue to be created. After that, my text is in the field. I would like to have my text in the field so the user did not have to type anything there.

The Description of the issue will be set to Brad - This is a test..
— THEN
Creates the issue originally.
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Created event that can be processed by the listeners.
Heather R April 15, 2020

This is a brilliant solution for custom fields. We didn't want the default text to appear until a certain point in the workflow so we used a precondition to look for a drop down field value and then if true, we update a different custom field with the "default" text.

Thanks for this!

1 vote
Anatoly Spektor January 2, 2020

I did not find how to do it for Description. You can do it for Custom Fields using Configure ->Default Text . As an option you can hide description and put a custom field named Description instead ? (full disclosure - I have not tried hiding description)

 

I have recorded how to do it with custom fields in the small video tutorial, hope it helps: https://youtu.be/W875OzVROHc

0 votes
Alper Cugun April 28, 2021

Isn't this solved in Jira Cloud Next Gen? I can just set the default for the Description field.

0 votes
Jurate Piliutiene March 10, 2021

There is also an option, to auto populate specific field from free text field (like summary or description) with ML1 plugin.  

0 votes
Shanta Nathwani September 4, 2018

This type of discussion was discussed and solved here: https://community.atlassian.com/t5/Jira-questions/How-do-I-pre-populate-text-to-a-description-field-on-JIRA-Cloud/qaq-p/456606

You have to use scripts on server to accomplish it. It is not possible on cloud.

Robert Dailey November 19, 2014

You did the same thing in that issue, creating a circular link. Fail.

Christian Brien July 7, 2016

That's not a fail.

It's simply ensuring people are made aware there is another thread on the subject, no matter which one they start with.

I appreciate Martin's initiative.

Like Dave Liao likes this
0 votes
JoeR August 18, 2013

<script type="text/javascript">
if (document.getElementById("description").value == "") {
document.getElementById("description").value = "your default";
}
</script>

roniz March 11, 2017

hi Joe,

I used this script in order to pre-populate the "Summary" field according to the Issue Type: The "Summary" field contains the same as the Issue Type field

-and it worked.

The problem is that when I open the "create" screen and change the Issue type, the "Summary" field doesn't change to match the Issue type.

 

Any ideas how I can solve this?

Suggest an answer

Log in or Sign up to answer