How do we add a default value for a system field (description)?

Nizan Freedman October 4, 2020

We would like to have a pre-populated description field for some of our issue types,
How can this be done?
We have ScriptRunner if that helps

Added clarification: We need the value to be prepopulated on the Create screen so the creator can edit it, not After the creation.

6 answers

1 accepted

3 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2020

Hi @Nizan Freedman 

Does the pre-population need to be on the Create screen (i.e pre-issue creation)? Or populated during/after creation?

I would consider the need for pre-population as part of this process. For example if it's a Story Template, you could end up with lots of Stories with just the template in them!

Ensure this requirement isn't going to leave you with unnecessary data. And, if the pre-populated text requires additional modification from your users to make it useful, that they're all aware of the upcoming enhancement.

----------

For pre-issue creation, there is no easy solution on Cloud. For templating, there are apps - such as Issue Templates for Jira - which might help.

Or, there is a workaround I've seen before - similar to this answer.

In summary you would:

  • Create a custom field called "Description". Please it on the Create Screen, removing the system default "Description" field.
  • Hide the custom field on Edit/View Screens, keeping the standard "Description" field.
  • Ensure the fields are setup correctly on the Issue Layout
  • Set a default value for the custom field, for pre-creation
  • Duplicate the data from the custom field to the system default field during creation, using either a post-function or an automation rule (my preference).

----------

For post-issue creation, i.e populating data into "Description" after the create button has been pressed, you could just use an Automation Rule

The rule could trigger when an issue is created, and the action would be to set text into Description.

----------

If you need help with either of these approaches, please let me know - I'd be happy to provide more detailed instructions :)

For pre-issue creation especially, there are a few moving parts to navigate, especially for the new issue view!

Ste

Nizan Freedman October 4, 2020

Thanks @Stephen Wright _Elabor8_  for the detailed answer!
Yes, pre issue creation indeed.

I understand your proposed workaround and I have my partial dislike to it due to the fact we are "faking" the actual description and need to maintain automation around changes to it.... but I understand that might be the only way....

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2020

Hi @Nizan Freedman 

True - but if setup correctly, it's not substantially different from a user-perspective.

What is the need driving the pre-population of the Description field? There might be an alternative I can suggest? :)

Ste

Moghal Jameer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 24, 2021

Hi,

Can we have Contexts and Default Values option for other fields in System Field Section other than Description.? Like Security Level,Created and Updated so that i can use the fields in Import process?

Jim Galindo October 20, 2021

I am using JIRA cloud and have some "software projects" (I cannot tell if they were classic or new since Atlassian now calls them all the same now) where I could go to Projects>Issue Types, select the issue type, then click on a field and add default content for the field on creation.   This is MUCH easier than the solution provided above to implement and manage across several projects. 

This feature is so useful I am wanting to move all my existing projects to this type of "software project", but cannot seem to find a way to create the exact type with this feature with the available projects available to create.  I raised a  question about that today.  It will be VERY disappointing if Atlassian has deprecated this feature with apparently no desire to re-add it 

 

https://community.atlassian.com/t5/Jira-Software-questions/How-to-default-content-into-Issue-Fields-e-g-Description/qaq-p/1841083

Jim Galindo October 20, 2021

And right after I post this, I worked it out.  My software projects need to be team managed rather than organisation managed.  By doing this, I can go into Project Settings > Issue Types, select Issue Type, then field and default in content into the system field. 

 

D250E871-A691-49CA-9830-3413FD259783_1_105_c.jpeg

Tenzing Doleck October 27, 2022

Hi @Stephen Wright _Elabor8_ 

 I was able to configure this - but with an outstanding issue. 

The post function works in that it is copying the customdescirption field to the description field . However it only does so once ticket is done being created . Not at the moment when you hit create ..

So now when I hit create-- the description field is still bank . 

This is for company managed jira cloud - I would like the field to populate pre-creation.

This is my set up : 

Screen Shot 2022-10-27 at 11.19.27 AM.png

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 26, 2022

Hi @Tenzing Doleck 

My suggestion is a native workaround - utilising a custom "Description" field, which then copies the data back into the standard system field post-creation.

There might be a small delay where the Description is empty - but it should be a very short period (i.e seconds). I use an Automation rule rather than a post-function though.

If you want a template pre-creation, you'll need to get an App for that from the Marketplace - see some options here.

Ste

1 vote
Leander Rijnders November 20, 2023

@Nizan Freedman 

I had the same question and was searching a lot for a simple solution. 

I have finally found a solution which is much easier. 

It's this app: https://marketplace.atlassian.com/apps/1211873/default-values-for-create-issue-screen-issue-templates?tab=overview&hosting=cloud 

 

There are more options, but most of them are paid and this one is free to use and works great.  Hope this helps you 

James December 22, 2023

Many thanks Leander, this is the perfect solution for what I've been wanting to do for ages.

Like Leander Rijnders likes this
1 vote
Niranjan
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.
October 4, 2020

Hi,

Script runner lets you to set default value for desc using behaviours.

https://scriptrunner.adaptavist.com/4.2.0.2/jira/behaviours-overview.html#_setting_a_default_description

Nizan Freedman October 4, 2020

Thanks @Niranjan 

In the cloud Script runner, there is no behaviours option AFAIK. Can you please correct me and point to such a documentation?

Niranjan
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.
October 4, 2020

Sorry, just realized that it is cloud versions. You are correct. Cloud versions do not have behaviors functionality. You may consider javascript/html code in the field configuration.

Janco Hoekstra December 8, 2020

Sorry for us, but javascript in the field configuration is disabled in Jira Cloud.
In my case want to set a prevalue for the summary field but for that I haven't found a sollution jet.
What I want to do is get a default value in my summery field so on creation jira doesn't complain about the summary field has no value. As a postfunction of create, I set the value of the summary to the value of the concatenation of two other obligatory fields in the Issue so uniqeness of the summary field is no issue. 
In Jira Server this was possible by putting:

<script type="text/javascript">
if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = concat((document.getElementById("AB Nummer"))," ",(document.getElementById("Kunde"))) ;
}
</script>

in the Description of the summary field, but this doesn't work anymore in cloud.

So if anyone has a solution for this, I would be delighted.

0 votes
Héctor Zárate April 11, 2024

Hi,

I just needed to pre-fill the Description field and I solved this this way:

Go to Issues-> System Fields

 

2024-04-12 08_20_44-System fields - CETITEC JIRA — Mozilla Firefox.png

Add a new context2024-04-12 08_22_14-Configure field_ Description - CETITEC JIRA — Mozilla Firefox.pngDefine the scope of this context and the default value you want for the field to have.

2024-04-12 08_25_01-Configure field_ Description - CETITEC JIRA — Mozilla Firefox.png

I hope this helps you

Leander Rijnders April 11, 2024

Scherm­afbeelding 2024-04-12 om 08.41.26.png

 

I can't do that, I don't have the option 'add context'. 

So therefore I have to use an app as mentioned above. 

 

We're using a company managed project, project type = software. 
What do you use? 

Héctor Zárate April 11, 2024

We are using Jira Data Center v8.13.20.

Kate Pawlak _Appsvio_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 12, 2024

@Leander Rijnders this option is not available in cloud.

Like # people like this
0 votes
Jarosław Solecki _Deviniti_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 12, 2023

@Nizan Freedman Quite a long time since you posted but maybe you still struggle with such a problem. 

There were made few changes in how Jira works which allowed us to create solutions for teams that have a need of making a create screen more flexible and usable for users. One of the annoying problems has been screens that are not designed for the user context. We made a few improvements to help with that. One of the things we introduce is the ability to set Default Values for fields. 

Moreover, you also gain some additional abilities like set value based on condition, and conditional show/hide fields, making them required or read-only

You can benefit from all those things with Dynamic Forms for Jira. If you have any questions or would like to have a demo session just book it here.

Simon Esposito
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 7, 2023

Yes, Atlassian's answer here (and in many other places) is ridiculous.

"Can you set a default value for the System Fields"

 Atlassian:

   -  "No, BUT why would you want to?"
   -  "No, but just replace the System one with a Custom one with the same name"
   -  "No, but just buy some third party marketplace add-on that solves it for us"


Hey, Atlassian, why dont YOU replace the System fields with Custom ones, if thats what it takes, or why dont you BUY a third party marketplace app and use it natively if you wont Dev things yourself......

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2023

There's a free App if that helps? Check out Default Values for 'Create Issue' screen 

Atlassian did also start working on this for Description and Priority, but the work was paused back in April - see JRACLOUD-4812 

Ste

Like James likes this
0 votes
yaniv.shoshani October 4, 2020

Hi Nizan,

A simple way is to add a Post Function in the Workflow of your issue type  in the first transition , and Set field value (of any system field) to the value you need.

It will work on a per workflow basis, it is simple to implement.

BR,

Yaniv (Methoda) 

Nizan Freedman October 4, 2020

Thanks @yaniv.shoshani 

Added a clarification - We need it on Create, before the creation ends...

Like Janco Hoekstra likes this
Charlie September 28, 2021

the system field Comments is not visible to set.

it is not possible to set it please?

Tenzing Doleck October 27, 2022

Hi @yaniv.shoshani 

Hi I was able to configure this - but with an outstanding issue. 

The post function works in that it is copying the customdescirption field to the description field . However it only does so once ticket is done being created . Not at the moment when you hit create ..

So now when I hit create-- the description field is still bank . 

This is for companymanaged jira cloud - i would like the field to populate pre-creation.

This is my set up : 

Screen Shot 2022-10-27 at 11.19.27 AM.png

Kate Pawlak _Appsvio_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 28, 2022

@Tenzing Doleck , as I said in the other post where you asked, this is how the post function works - they're executed on the existing issue. You can't use it on the Create issue screen when you don't have an issue yet.

The same situation is with automation rules. You can do everything when the issue is created.

What I can propose is trying our app called Issue Templates Agent for Jira. It allows you to create templates which can be applied on the Create Issue screen when you put the "template" phrase into the Summary field. 

Best regards,

Kate

Chief Product Officer & Co-founder @Appsvio | Atlassian Community Leader

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events