Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

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

Inayat Nahvi
Contributor
December 10, 2013

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

0 votes
Answer accepted
Ubisoft
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.
December 23, 2013

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.

RambanamP
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.
December 23, 2013

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

2 votes
Ubisoft
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.
December 22, 2013

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>

Inayat Nahvi
Contributor
December 23, 2013

Thanks. This works exactly like I need it to.

Vera Henrichs
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.
June 6, 2016

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?

0 votes
Gebsun
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.
November 19, 2014

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

0 votes
RambanamP
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.
December 22, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events