I need to pre-populate/auto fill the Summary field based on issue type.
Ive tried to create a custom field that has pre-populated text, and that gets assigned to a specific screen based on the specified issue type, and the use either a post function jsu script or the built in copy field to field option but I cant get past the validators for summary being empty.
Also appears JSU Behaviors wont work either because Summary isnt a field I can configure for behaviors.
Summary is a required field, but surely their has to be away for customization where we can either pre-populate this field based on criteria or make it not required using scripting such that we are trying to populate it based on custom field input.
Using JIRA Server on prem.
Hi, @Jeremy Cejka
I do it with javascript.
You would need check if HTML is enabled to field descriptions in Administration > General Configuration > Enable HTML in field descriptions and list item values
After enabled, go to issue type's field configuration and edit the description from Summary Field with this script:
<script>
createScreen = document.querySelector('[name="jiraform"]')
if (createScreen){
summary = createScreen.querySelector('[id="summary"]')
summary.value = "YOUR TITLE"
}
</script>
<script>
createScreen = document.querySelector('[name="jiraform"]')
if (createScreen){
summary = createScreen.querySelector('[id="summary"]')
summary.value = "YOUR TITLE"
summary.parentElement.hidden = true
}
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had tried it but it was working, but then i came across this " you have to Enable HTML in custom field descriptions and list item values"
I thought it was already done because in years past this process was originally configured in another project/issue type. Turns out some where along the update path from years ago to now, this setting was disabled.
turned it on and my script in the field description worked. Before stumbling upon "you have to enable ..." I just assumed it was another atlassian'ism where they took that feature away.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.