[
{
"type": "validator",
"name": "Comment Required Validator",
"config": {
"errorMessage": "Please provide a comment explaining why this incident is being moved to 'Pending'."
}
}
]
[
{
"type": "post_function",
"name": "Set field value",
"config": {
"field": "Assignment Group",
"value": "{% set subcat = issue.fields.Subcategory.value %}\n{% if subcat == 'Software Installation' or subcat == 'Application Defect' %}\n Application Services\n{% elif subcat == 'Mail Archive' or subcat == 'Access' %}\n Email\n{% elif subcat == 'Access to File Share (Internal)' %}\n Shared files and folders\n{% elif subcat == 'Data' and 'GBA' in issue.fields.Summary %}\n ERP Solutions\n{% elif subcat == 'PC' or subcat == 'Monitor' %}\n Computer/Accessories\n{% else %}\n {{ issue.fields['Assignment Group'] }}\n{% endif %}"
}
}
]
[
{
"type": "validator",
"name": "Comment Required Validator",
"config": {
"errorMessage": "Please provide a comment explaining why this resolved incident is being reopened."
}
}
]
[
{
"type": "validator",
"name": "Field Required Validator",
"config": {
"field": "Close Code",
"errorMessage": "The 'Close Code' is required to move this incident to 'Completed'."
}
}
]
[
{
"type": "post_function",
"name": "Transition Issue",
"config": {
"transition": "Close",
"delay": "5d",
"condition": "{{ issue.status.name == 'Completed' }}",
"runAs": "addon"
}
}
]
[
{
"type": "post_function",
"name": "Send an email",
"config": {
"conditionalExecution": "{{ issue.fields.Priority.value in ['1 - Critical', '2 - High'] }}",
"to": {
"value": "incident-managers@example.com",
"type": "email"
},
"subject": "High Priority Incident Created: {{issue.key}} - {{issue.summary}}",
"body": "A new incident with priority '{{issue.fields.Priority.value}}' has been created by {{currentUser.displayName}}.\n\nLink: {{issue.url}}"
}
}
]