How to add more fields to the Copy Incident (UI Action) in Kingston?

JLeong
Mega Sage

Hi Guys,

We have some fields in the Incident table that are customized. I would like those to be added to the Copy Incident (ui action). This UI Action is new in Kingston.

Not sure where to add them.

Thanks in advance for your assistance.

Jocelyn

 

 

8 REPLIES 8

Mike Patel
Tera Sage

There is a system properties called - com.snc.incident.copy.rl.task_ci.attributes

You can add fields that you would like to be copied over.

Thanks Mike!

Actually there is a system properties called - com.snc.incident.copy.rl.task_ci.attributes

In this, you can add fields that you would like to be copied over.

 

subhashuniyal
Tera Contributor

I added the highlighted code to IncidentUtils Script Include as below and it worked. I had a requirement to add assigned_to field. let me know if this helped.

var IncidentUtils = Class.create();
IncidentUtils.prototype = Object.extendsObject(IncidentUtilsSNC,{
//this is the custom code just added assigned_to to the fields to be copied
INCIDENT_DEFAULT_ATTR_VALUE: 'assignment_group,business_service,category,caused_by,cmdb_ci,company,description,impact,location,parent_incident,problem_id,rfc,short_description,subcategory,urgency,assigned_to'}, {
initialize: function(request, responseXML, gc) {
IncidentUtilsSNC.prototype.initialize.call(this, request, responseXML, gc);
},

/***************Custom changes****************/

type: 'IncidentUtils'
});

IncidentUtils.isCopyIncidentEnabled = function(current) {
var incidentUtils = new IncidentUtils();
return incidentUtils.isCopyIncidentFlagValid();

};

IncidentUtils.isCreateChildIncidentEnabled = function(current) {
var incidentUtils = new IncidentUtils();
return incidentUtils.isCreateChildIncidentFlagValid();

};