Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,414,322
Community Members
 
Community Events
170
Community Groups

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

Edited

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.

3 answers

1 accepted

1 vote
Answer accepted

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

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....

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

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?

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

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

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

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

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 Oct 04, 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.

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.

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) 

Thanks @yaniv_shoshani 

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

Like Janco Hoekstra likes this

the system field Comments is not visible to set.

it is not possible to set it please?

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

@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 free 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

Atlassian Community Events