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

Summary default value not always shown

Alessandro Tondo
Contributor
February 19, 2018

I've set a default value for the summary in a specific Field Configuration, and for a particular issue type, using the following code in the summary Description

<script type="text/javascript">
document.getElementById("summary").value = "Autogenerated on issue creation, do not modify.";
</script>

However the default value is displayed only if I create that issue in the relative project, i.e. the creation from another project does not shown the default value, even if the correct custom fields are displayed.

Moreover, if I check the "Create another" when adding that issue type from the right project, only the first issue has the summary filled with the default value. On the view refresh, it does not refill the default value.

Any suggestions?

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -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.
February 19, 2018

Yes, that's correct, your javascript is being run in the wrong place.  It's being rendered too late in the page generation.

You should not be injecting javascript like this, it's not going to work the way you want it too, it's unreliable and hard to maintain.  Defaulting the summary suggests you're misusing the field as well and a change of your usage would be a better option than dubious clunky hacks.

Alessandro Tondo
Contributor
February 19, 2018

All right then, I'm going to try to rearrange the automatic creation of certain issues.

Thanks Nic, you're great!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events