Hello all, I need some help, here is a script which is mapped with description.
def desc = getFieldById("description")
def customerValue = """\
h2. Please answer the below questions
* Customer Name:
* Customer Id:
* Start Date:
* End Date:
* Additional Information :
""".stripIndent()
if (!desc.formValue) {
desc.setFormValue(customerValue
}
The above behaviour script is working fine. I mean whenever users click to create tickets it’ll display those customer questions in the description field. We have multiple components like “Customer, Suppliers, Products”, etc. I would like to have a template for each component, like the above is for the “Customer” component, then I want to create a template for Supplier and Product. That template should be map with components. I mean whenever the user selects Customer it should display the Customer template in the description, if Supplier it should supplier template.
How I can achieve this, I don’t know about the groovy language. I really appreciate your help