- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2015 04:14 PM
Thanks Berny for your assistance. Let me explain what I'm doing a different way.... becauseIdon't believe that an assignment rule will work
- I added a new field to the CI record that indicates whether the assignment group associated with the CI should auto-populate on an incident form or not. The new field will be a checkbox. The label will be "Disable Auto-populate Assignment Group on Incidents?"
- I need to create a rule to the incident form that will evaluate the value of the checkbox field on the CI and if the box is checked, the Assignment Group will NOT auto-populate on the incident form. The assignment group lookup table will show the "parent" Assignment group that is assigned to the CI and the Child Assignment groups of the "parent" group
- If the checkbox is not checked on the CI record, the Assignment Group will continue to auto-populate the assignment group that is associated with the CI.
- The Service Desk agents will be instructed to select the correct assignment group based on location (that is what the child groups are) when the assignment group does not automatically populate.
- If the Incident has to be reassigned to a different group, then the CI has to be blanked out or changed. The notion is that if the incident needs to be reassigned, the issue must be associated to a different CI than the one originally chosen.
- The CI has both an Assignment Group field and a Checkbox called Disable Assignment Group.
- Currently I am using a reference qualifier (dictionary entry on the assignment group field on the inc form) (that is working) to auto populate the assignment group for the selected CI if there are any group children the lookup shows only the children for the assignment that was auto populated. (answer = 'parent=' + current.cmdb_ci.support_group )
I created the following Script Includes:
with this scrip:
varu_INC_FilterAssignmentOnDisableTrigger = Class.create();
u_INC_FilterAssignmentOnDisableTrigger.prototype = {
initialize: function() {
},
type: 'u_INC_FilterAssignmentOnDisableTrigger'
//if(current.sys_class_name == 'incident') {//tomakesurethefilter is only on the incident table
varcurrent_source = current.cmdb_ci;
varanswer= current.assignment.group;
if(current.cmdb_ci. u_disable_auto_populate_assign == true) {//return parent - child assignment groups
answer= ''parent=' Current.assignment.group+ current.cmdb_ci.support_group';
}
if(current.cmdb_ci. u_disable_auto_populate_assign =!true) {//return group assigned to cmdb_ci
answer= 'assignment.cmdb_ci';
}
returnanswer;
}
return'';
}
**********************
But as you can see I am getting an error and I don't know how to fix it.... Once I can get this to work I believe my next step would be to create a reference qualifier javascript: u_INC_FilterAssignmentOnDisableTrigger....... Am I on the right track? (this is my first attemp a scripting or using script includes)
Any assistance would be greatly appreaciated.
April