Doer & Checker Validation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2020 10:07 PM
In order to address an audit violation, my Services needs to validate that the Implement Change (Doer) & the Check Implementation (Checker) tasks are not assigned to the same person. The assignment group can be the same, but the Assigned to, should be a different person
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2020 02:27 AM
Ok, so I am hoping there is some Task Type for that validation task as well based on which here is the script.
Client script on Change of Assignee
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var assignee = g_form.getValue('assigned_to');
var id = g_form.getValue('change_request');
var ctask_type = g_form.getValue('change_task_type');
if(ctask_type == 'Implementation')
{
var Ajax = new GlideAjax("checkUser");
Ajax.addParam("sysparm_name","validateChecker");
Ajax.addParam("sysparm_user",assignee);
Ajax.addParam("sysparm_id",id);
Ajax.getXML(getVal);
}
if(ctask_type == '<ctask type of validation>')
{
var Ajax1 = new GlideAjax("checkUser");
Ajax1.addParam("sysparm_name","validateImplementer");
Ajax1.addParam("sysparm_user",assignee);
Ajax1.addParam("sysparm_id",id);
Ajax1.getXML(getVal1);
}
function getVal(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
if(answer == "true")
{
alert('Checker cannot be same as the Implementer.');
g_form.setValue('assigned_to',"");
}
}
function getVal1(response) {
var answer1 = response.responseXML.documentElement.getAttribute('answer');
if(answer1 == "true")
{
alert('Implementer cannot be same as the Checker.');
g_form.setValue('assigned_to',"");
}
}
}
Script Include:
Please write similar function for validateImplementer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2020 11:38 AM
Hi Jyothsna,
Did provided solution work for you?