[
{
"type": "validator",
"name": "Restrict transition execution",
"config": {
"condition": "false",
"errorMessage": "An Incident in 'Work in Progress' cannot be moved back to 'Open'. Please move it to 'Pending' if it is blocked, or cancel it if it is no longer valid."
}
}
]
[
{
"type": "validator",
"name": "Field Required Validator",
"config": {
"field": "Close Code",
"errorMessage": "Please provide a 'Close Code' before closing the Incident."
}
}
]
[
{
"type": "scheduled_rule",
"name": "Daily check for stale Pending incidents",
"config": {
"cron_expression": "0 0 1 * * ?",
"jql_scope": "issuetype = 'Work Type = Incident' AND status = Pending AND updated <= '-5d'",
"actions": [
{
"type": "post_function",
"name": "Set field value",
"config": {
"field": "Close Code",
"value": "No feedback from user"
}
},
{
"type": "post_function",
"name": "Add a comment",
"config": {
"comment": "This Incident has been automatically closed due to inactivity for more than 5 days."
}
},
{
"type": "post_function",
"name": "Transition issue",
"config": {
"transition": "Close"
}
}
]
}
}
]
[
{
"type": "validator",
"name": "Comment Required Validator",
"config": {
"errorMessage": "Please provide a comment explaining why this Incident is being reopened."
}
}
]
[
{
"type": "post_function",
"name": "Set field value using an expression",
"config": {
"field": "Assignment Group",
"expression": "def subcategory = issue.get('Subcategory')?.value;\nswitch (subcategory) {\n case 'VPN':\n case 'WAN Connectivity':\n case 'Webfilter':\n return 'Network and Firewall';\n case 'Software Installation':\n case 'Access':\n case 'Patching':\n return 'Application Services';\n case 'Mobile Device':\n case 'Tablet':\n return 'Mobile / Cell Phones';\n default:\n return issue.get('Assignment Group');\n}"
}
}
]
[
{
"type": "validator",
"name": "Field Required Validator",
"config": {
"field": "Pending Reason",
"errorMessage": "Please select a 'Pending Reason' to explain why this Incident is being put on hold."
}
}
]