Name
global.ShadowTaskAndRelationChecker
Description
No description available
Script
var ShadowTaskAndRelationChecker = Class.create();
ShadowTaskAndRelationChecker.prototype = {
initialize: function() {
},
type: 'ShadowTaskAndRelationChecker'
};
ShadowTaskAndRelationChecker.isSoft = function(_current) {
if( JSUtil.notNil(_current) &&
_current.getValue("inter_task_dependency_type") == "soft" ) {
return true;
}
return false;
};
ShadowTaskAndRelationChecker.isHard = function(_current) {
if( JSUtil.notNil(_current) &&
_current.getValue("inter_task_dependency_type") == "hard" ) {
return true;
}
return false;
};
ShadowTaskAndRelationChecker.isUpstreamRelation = function(sysId) {
if( JSUtil.notNil(sysId)) {
var shadowRelation = new GlideRecord("planned_task_rel_planned_task");
if(shadowRelation.get(sysId)) {
if(JSUtil.notNil(shadowRelation.getValue("orig_sys_id"))) {
var externalRelation = shadowRelation.orig_sys_id.getRefRecord();
if(shadowRelation.getValue("parent") == externalRelation.getValue("parent"))
return true;
}
}
}
return false;
};
Sys ID
10d2b9839f122200598a5bb0657fcf8b