@property {String} status [required, default: New](Specify a system-defined Incident status to assign to the Incident from the available options)
@property {IncidentResolution} resolution (Specify a user-defined Resolution to assign the Incident)
@property {IncidentSeverity} severity (Specify a user-defined Severity to assign the Incident)
- @property {UserAccount} owner
+ @property {UserAccount} owner
@property {Employee} assignedTo (Specify the user you want to assign the Incident to)
@property {String} notes (This is a scrolling text field with word-wrapping for entering general Notes related to the Incident. When a Note is entered, the content of the Note will also automatically be inserted as a Comment on the Incident. The Comment created this way may not be edited; however, if you edit the Note, the associated Comment will include your edits)
@property {Item} item (Use the field to link an Incident to a specific Item or Lot/Serial Number)
@property {IncidentAlarm} alarms ()
@property {IncidentAccount} accounts
@property {IncidentComment} comments (To view system-generated Comments associated with an Incident or to add new Comments of your own. select the "Comments" tab)
- @property {IncidentCharacterisitic} characterisitcs
+ @property {IncidentCharacterisitic} characterisitcs
@property {IncidentContact} contacts
@property {IncidentIncident} incidents
@property {IncidentOpportunity} opportunities
"contacts", "items", "files", "urls", "accounts", "incidents", "uuid", "opportunities",
"toDos", "toDoRelations", "project", "projects", "customers"],
requiredAttributes: ["description", "status", "created", "category", "account", "contact",
- "number"],
+ "number"],
/**
@member Setup
@memberof Incident
}
};
var additionalTests = function () {
+ describe("Incident status behavior", function () {
+ var incidentModel;
+
+ beforeEach(function (done) {
+ incidentModel = new XM.Incident();
+ incidentModel.once("status:READY_NEW", function () {
+ done();
+ });
+ incidentModel.initialize(null, {isNew: true});
+ });
+ it("Incident status starts out as new", function () {
+ assert.equal(incidentModel.get("status"), XM.Incident.NEW);
+ });
+ it("Incident status gets set to assigned when user is assigned to it", function () {
+ incidentModel.set("assignedTo", new XM.UserAccountRelation());
+ assert.equal(incidentModel.get("status"), XM.Incident.ASSIGNED);
+ });
+ });
/**
@member Privileges
@memberof Incident
@description Users with "ViewPersonalIncidents" privilege can read their personal Incidents
- but cannot read the contact's owned by other users. Users with "MaintainPersonalIncidents"
+ but cannot read the contact's owned by other users. Users with "MaintainPersonalIncidents"
privilege can create and update their personal Incidents but not the Incidents owned
- by other users
+ by other users
*/
it.skip("Users with \"ViewPersonalIncidents\" privilege can read their personal Incidents" +
"but cannot read the Incidents owned by other users. ", function () {
@description Contacts search should display only contacts related to the specific account, if
account is already selected
*/
- it.skip("History panel should be available which displays the Incident history", function () {
+ it.skip("Contacts search should display only contacts related to the specific account", function () {
});
/**
@member Other
@description Characteristics Drop down list should display the characteristics assigned to the
Incidents
*/
- it.skip("History panel should be available which displays the Incident history", function () {
+ it.skip("Characteristics Drop down list should display incident characteristics", function () {
});
};
exports.spec = spec;
exports.additionalTests = additionalTests;
-}());
\ No newline at end of file
+}());