How do I create a default entry for the description field specific to a project?

This worked in JIRA 4.1.1, but not after upgrading to JIRA 5.2.10. In 4.1.1, I would go to the field configuration of a specific project. Within it, I would go to the Description field, click on edit, and type my java script. Then, whenever a new issue is created in this specific project, a default text would appear within the description box.

However, this is no longer working in JIRA 5.2.10. Any suggestions? Keep in mind, I want the description field to be populated with default text only for a particular project, not all projects. Thanks.

4 answers

1 accepted

He need it in the specific project so it need to be in the field configuration of all the issue type wanted for that project, its easier that way.

yes i know that, we need to add condition, that can be done!!

Hello, in your specific field configuration just put this and it will work with jira 5.2

<script type="text/javascript">

AJS.$("#description").val("default value");

</script>

Thanks. This works exactly like I need it to.

Hi, this sounds like something I need too.

I have JIRA 6.4.12. 

I don't understand what to do with that piece of code. Can you help me?

try with this script by adding it in announcement banner for testing purpose

<script type="text/javascript">
function addDefaultValue() {
//need to add condition here
AJS.$("#description").val("default value"); } (function($) { AJS.toInit(function(){ // init on load addDefaultValue() }); JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) { // init on refresh addDefaultValue() }); })(AJS.$); </script>

i suggest to load it as webresource module in plugin, check this

https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen

Hi guys,

There is Default Values plugin available for JIRA. It allows to define default value for description and number of other fields (per project and issue type): 

https://marketplace.atlassian.com/plugins/com.gebsun.plugins.jira.defaultvalues

Regards,

Gebsun

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,945 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot