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.
×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?
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.
All right then, I'm going to try to rearrange the automatic creation of certain issues.
Thanks Nic, you're great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.