var MajorIncidentTriggerRules = Class.create(); MajorIncidentTriggerRules.prototype = Object.extendsObject(MajorIncidentTriggerRulesSNC, { canPromoteMIC: function() { // check if incident is not prio 1 or prio 2 if (current.priority != 1 && current.priority != 2) { // Hide the UI Action return false; } return this.canApproveMIC() && (gs.getProperty(this.PROP_MAJOR_INCIDENT_CREATION, this.MAJOR_INCIDENT_CREATION.CREATE_NEW) == this.MAJOR_INCIDENT_CREATION.PROMOTE); }, canProposeMIC: function() { if (current.priority != 1 && current.priority != 2) { // Hide the UI Action return false; } if(!gs.hasRole(this.ROLE_ITIL + ',' + this.ROLE_INCIDENT_WRITE) || this.isIncidentInactive()) return false; // A child incident cannot be proposed as a major incident candidate if(this._gr.parent_incident) return false; // An incident can be proposed as a major incident manually, only if it is not already proposed and not already accepted as a major incident. // If an incident was rejected or canceled as major incident, user can again propose as a major incident based on new justification. return gs.nil(this._gr[this.ATTR_MAJOR_INCIDENT_STATE]) || this._gr[this.ATTR_MAJOR_INCIDENT_STATE] == this.MAJOR_INCIDENT_STATE.REJECTED || this._gr[this.ATTR_MAJOR_INCIDENT_STATE] == this.MAJOR_INCIDENT_STATE.CANCELED; }, type: 'MajorIncidentTriggerRules' });