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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.