It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to pre-populate a required field on issue create

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.

7 answers

1 accepted

0 votes
Answer accepted

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

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.

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

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.

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!

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

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?

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

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.

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.

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you