We have two ways to set a default template in the “Description” system field inside the Jira tickets. One way is using the famous plugin Adaptavist ScriptRunner “Behaviours”.
Just press the key “.” in your usual Jira screen. We now are in the navigation menu.
We will go to “Behaviours” config page.
Now we can create a simple Behaviour for the Description field restricted to selected Projects and selected Issue Types. To start, we put a Name to the new Behaviour.
Now we restrict the use of the script, and we add a new “Mapping” (of Projects and Issue Types to apply)
Once restricted, we can configure the Fields. Just click on “Create Initialiser“.
Now we leave the two first fields in blank, and we add the Script content.
Script like this:
Here the code:
def desc = getFieldById("description") def defaultValue = """ Here the template... """.replaceAll(/ /, '') if (! underlyingIssue?.description) { desc.setFormValue(defaultValue) }
Now we will see when we raise new Jira tickets, the description will be filled with the default template content configured.
(Click here to see a little help of how to create your description Template using Wiki Renders)
3 replies on “How to set a default description template in your Jira tickets.”