Setting a Default Description
In this example, we set a default description for renewal issues in the Great Adventure Licensing and Finance project. We recommend you change the details in this example and use your own project/s and description. This description contains set text to help the licensing specialists complete the issues, acting as a template to gather the correct information.
- From ScriptRunner, navigate to Behaviours.
- Select Create Behaviour.
- Enter a name for the behaviour. In this case we enter
Renewal Description
. - Enter a description for the behaviour. This field is optional but in this case we enter
This behaviour adds a default description to new renewal issues
. - Select Create Mapping.
- Then select the project and issue type(s) to map this behaviour to. In this case we chose the Great Adventure Licensing and Finance project and All issue types.
- Select Add Mapping to confirm the mapping.
Select Create to create the behaviour.
You're taken to a screen where you can configure the behaviour further.- Select Create Script under Initialiser.
- Copy the following code into the inline script editor:
def desc = getFieldById("description") def defaultValue = """\ h2. Renewal Information * Confirm Company Name: * Confirm Existing License: * Confirm Number of Users: * Confirm Type of License: h3. Notes Provide any notes on renewal. Copy/pate from proposals and email correspondence as needed. h3. Final Actions * Update Jira Issue with appropriate information. * Assign issue to Licensing lead for approval. """.stripIndent() if (!desc.formValue) { desc.setFormValue(defaultValue) }
Select Save Changes.
You can now test to see if this behaviour works!