- 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:21 PM
Hello Sasidhar,
Create an Before business rule(insert update checkbox set to true) on problem table with the filter condition as parent | is not empty and with script as
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', current.parent);
gr.query();
if(gr.next())
{
current.assignment_group = gr.assignment_group;
}
You may also want to add another filter condition assignment group is not empty depending on your req.
P.S : This business rule is required in case you edit and add the problem manually on incident via slushbucket.
The same changes you will have to do on the UI action code. Adjust the code the same way by looking on how other fields are set on problem ticket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:22 PM
Hi Sasidhar,
You only have to add 1 extra line of code in the OOB UI Action 'Create Problem', which is available in the Incident form. Please find the snapshot of the updated UI Action script below, where I have added line number 7 only.
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: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
‎10-15-2017 04:03 AM
