I am unable to set Summary Field default value.

Javier March 16, 2012

Hi everyone,

I need to hide the Summary field... and I finally did it by taking it out from the specific Screens.

Unfortunately, system still asks me for a value in this field.

I have tried to set the following javascript code in Summary description (Field configuration):

<script type="text/javascript">
if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = "Some Information:\n";
}
</script>

I have even reindexed and restarted Jira in order to this modifications to be taken into account, with no effects.

Can anyone help me with this issue?

Thank you.

Javier.

Notes:

a) I am using Jira 4.4

b) I cannot access the local system, so I cannot change any JIRA file from my location.

c) I am used to managing Jira from a functional view, but I am a newbie in programming Jira. I can only set javascript and so on.

:)

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
March 16, 2012

If you added the script in the description of summary field and summary is not on screens, the Javascript will not be invoked. Try adding the Javascript under the description of a field that is on the screen.

Javier March 16, 2012

Hi Jobin,

I will make this field visible again and put a dummy content as "You can also write here.", and I will tell you the results.

Thank you for your quick answer.

Javier.

Dawn Fama February 4, 2019

If you add this javascript for the system summary field, will it affect all projects summary field, or is it specific per project?

1 vote
JörgS December 19, 2016

You can use a plugin instead of the script. Workflow Essentials for JIRA allows you to define default system field values including the summary field.

Gabriel Grijo March 21, 2019

Just like to thank Jörg for the tip, even then its 2019, i was stuck on this problem and Workflow Essentials for JIRA helped me out a lot. Thanks.

1 vote
Alexey I_ Kiyashko June 3, 2015

Hello! Found answer for jira 5.2: <script type="text/javascript"> if (document.getElementById("summary").value == "") { document.getElementById("summary").value = "Value"; } </script>

Sonya Chen February 16, 2016

this only work for the second click in my environment. how can I enable the first click?

1 vote
Javier March 16, 2012

Jobin's comment has been a very important key to find the solution.

His comment opened my mind and I realized that I had several Field Configurations, Screens and Screen Schemes and I have had set the javascript code in the default field configuration!!!!

I set to visible the Summary fields in all the configurations and set the javascript code in every clone of summary field description (one clone per field configuration).

To ensure the lack of visibility of Summary, I placed it in different tabs.

... AND ALL STARTED WORKING AS REQUIRED.

Thank you Jobin, your help has been the key.

Javier.

Jobin Kuruvilla [Adaptavist]
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.
March 16, 2012

np, glad it helped :)

Valerie AQUILA June 10, 2013

Hello,

I've tried the same, but does nt work for me :-(

I may have missed something ??

I'm with jira 5.2, should it work also for this ?

Thanks in advance

0 votes
kdyh pa November 15, 2016

the same question

0 votes
Sonya Chen February 15, 2016

Hi everyone,

I met a problem and hope you could help me out. I'm using JIRA 6.4.3.

I have set the following script

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

in one of my field configuration. And in testing it was good.

But now it turned out that, the default value wouldn't come out for the first time you click Create after you log on. The system would give error message and you have to quit. Then you click Create again, there are the default value.

Why? And how can I fix this?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events