111 lines
3.2 KiB
JavaScript
111 lines
3.2 KiB
JavaScript
"use strict";
|
|
/**
|
|
* Value object for assignment item.
|
|
*
|
|
* @author Victor Shevchenko
|
|
* @author Igor Samulenko
|
|
*
|
|
* @constructor
|
|
*/
|
|
function TicketConsoleItemVO() {
|
|
this.detailedDescription = '';
|
|
this.type = '';
|
|
this.desc = '';
|
|
this.impact = '';
|
|
this.displayId = '';
|
|
this.parentId = '';
|
|
this.isEscalated = false;
|
|
this.priority = '';
|
|
this.productName = '';
|
|
this.urgency = '';
|
|
this.scheduledStartDate = '';
|
|
this.submitDate = '';
|
|
this.slaStatus = '';
|
|
this.summary = '';
|
|
this.modifiedDate = '';
|
|
this.targetDate = '';
|
|
this.urgency = '';
|
|
this.deploymentStartDate = '';
|
|
this.deploymentEndDate = '';
|
|
this.scheduledEndDate = '';
|
|
this.actualEndDate = '';
|
|
this.actualStartDate = '';
|
|
this.completedDate = '';
|
|
this.submittedBy = '';
|
|
this.vendorTicketNumber = '';
|
|
this.resolvedDate = '';
|
|
this.respondedDate = '';
|
|
this.incidentType = '';
|
|
this.majorIncident = '';
|
|
this.reportedSource = '';
|
|
this.taskType = '';
|
|
this.workOrderType = '';
|
|
this.changeClass = '';
|
|
this.changeReason = '';
|
|
this.riskLevel = '';
|
|
this.investigationDriver = '';
|
|
this.validateCompany = false;
|
|
this.requiredResolutionDate = '';
|
|
this.resolutionNote = '';
|
|
this.processFlowInstanceId = '';
|
|
this.processFlowName = '';
|
|
this.milestone = '';
|
|
this.businessJustification = '';
|
|
this.releaseType = '';
|
|
this.chatSessionId = '';
|
|
this.templateId = '';
|
|
this.templateGuid = '';
|
|
// complex fields
|
|
this.supportGroup = {};
|
|
this.assignee = {};
|
|
this.customFields = {};
|
|
this.customer = {};
|
|
this.company = {};
|
|
this.impactedService = {};
|
|
this.status = {};
|
|
this.serviceTargets = {};
|
|
this.categories = {};
|
|
this.categorizations = {};
|
|
this.vendorGroup = {};
|
|
this.contact = {};
|
|
this.owner = {};
|
|
this.ownerGroup = {};
|
|
this.requestManager = {};
|
|
this.requestManagerGroup = {};
|
|
this.changeManager = {};
|
|
this.changeManagerGroup = {};
|
|
this.problemCoordinator = {};
|
|
this.problemCoordinatorGroup = {};
|
|
this.releaseCoordinator = {};
|
|
this.releaseCoordinatorGroup = {};
|
|
this.isInApproval = false;
|
|
this.allowBulkUpdateStatus = true;
|
|
this.needsAttention = '';
|
|
}
|
|
// inherit BaseVO
|
|
TicketConsoleItemVO.prototype = new BaseVO();
|
|
// correct the constructor pointer
|
|
TicketConsoleItemVO.prototype.constructor = TicketConsoleItemVO;
|
|
/**
|
|
* @override
|
|
* @return {Array}
|
|
*/
|
|
TicketConsoleItemVO.prototype.getProps = function () {
|
|
var keys = Object.keys(new TicketConsoleItemVO());
|
|
return BaseVO.prototype.getProps().concat(keys);
|
|
};
|
|
TicketConsoleItemVO.prototype.postBuild = function () {
|
|
for (var i = 0; i < this.categorizations.length; i++) {
|
|
for (var prop in this.categorizations[i].tiers) {
|
|
this.categories[prop] = this.categorizations[i].tiers[prop];
|
|
}
|
|
}
|
|
//check if status is closed or staged then set bulkUpdateStatus flag to false
|
|
this.allowBulkUpdateStatus = true;
|
|
if ((this.type === EntityVO.TYPE_TASK && this.status && this.status.value === "Staged") ||
|
|
(this.status && this.status.value === "Closed") ||
|
|
this.isInApproval) {
|
|
this.allowBulkUpdateStatus = false;
|
|
}
|
|
};
|