- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:15 PM
Hi,
Problems are to be assigned to the appropriate resolver groups based on the associated incident record ,
Based on Assignment group in incident ,related problem Assignment group must be auto populated means when we select an assignment group in incident , and when we relate any problem to that incident then the assignment group in problem must be auto populated as the same which we selected in incident .
How to do this could you please help me in this
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:35 PM
Hi sasidhar,
Alternatively you can go with the below Business rule also. Let's take the scenario where the User updates the 'Problem' field available in the incident form manually without availing the UI Action 'Create Problem'. In that case the above script won't run and your requirement will not meet.
Hence I would encourage you to opt for the below Business rule which will be applicable for the above mentioned scenario as well as whenever the user clicks the UI Action 'Create Problem'.
(function executeRule(current, previous /*null when async*/) {
var prob = new GlideRecord('problem');
prob.addQuery('sys_id', current.problem_id);
prob.query();
if(prob.next()){
prob.assignment_group = current.assignment_group;
prob.update();
}
})(current, previous);
I hope this helps. Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:22 PM
Hi Sasidhar,
When you create a problem from incident using the OOB UI action Create Problem, you can copy the current assignment group on the incident record to that on the problem record by updating the script in the UI action to include the following statement:
prob.assignment_group = current.assignment_group;
The code would look something like:
var prob = new GlideRecord("problem");
prob.short_description = current.short_description;
prob.cmdb_ci = current.cmdb_ci;
prob.priority = current.priority;
prob.company = current.company;
prob.assignment_group = current.assignment_group; //copies the incident assignment group to the problem record
prob.sys_domain = current.sys_domain;
var sysID = prob.insert();
current.problem_id = sysID;
var mySysID = current.update();
gs.addInfoMessage("Problem " + prob.number + " created");
action.setRedirectURL(prob);
action.setReturnURL(current);
Let me know if this works for you.
PS: Mark this answer as Correct if it solved your query or hit Like/Helpful depending upon the usefulness of the response.
Regards
Supriya Bisht
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2017 10:16 AM
when we relate any problem to that incident then the assignment group in problem must be auto populated as the same which we selected in incident .
Is this the right approach?
Usually a team that does problem management isn't involved in incident resolution - problem investigation and diagnosis tends to be a second-line activity, but incident management is a frontline responsibility (service-desk stuff).
What happens if several incidents with different assignment groups are linked to the same problem record? Which group is then picked?
