Script example

In this example, the assignment rules use JavaScript code to assign incidents to a particular assignment group based on the incident category.

Table 1. script incident category
This incident category Is assigned to this assignment group
Hardware Hardware
Software Software
Malware Security
Figure 1. Assignment by script
The following script requires configuring the instance to add the Malware category and the Security assignment group.
if(current.category=="Hardware"){
   current.assignment_group.setDisplayValue("Hardware");}elseif(current.category=="Software"){
   current.assignment_group.setDisplayValue("Software");}elseif(current.category=="Malware"){
   current.assignment_group.setDisplayValue("Security");}