Incident Fields on Metrics Table

swapnil15
Tera Contributor

Hi All,

I have created a metrics definition for assigned_to/ incident table. It shows me the duration based on changes a user had made on the assigned_to field. I am calling this table on the report so that the end users get the insights of when the assignee started working on the ticket. Later, the ask was to show caller and service field as well in the report.

 

So here comes my concern - How can I get the caller and service field from incident table on the metric table to show case in report?

 

I have one approach but I dont know how to implement it -

There is a field called ID which stores the incident number as below:

swapnil15_0-1703000174893.png

 

I need to add two columns caller and service from the incident table on the metric_instance table which are shown as attached snip. These fields will show me the data related to the incident number in the field ID. The data stored in the field is like 'Incident : INC123456'. So, suppose if the ID contains ' Incident : INC123456' then it will get me the caller and the service used for that record. Similary it should work for all the other records. 

1 ACCEPTED SOLUTION

Matthew Knight
Tera Guru

Hi @swapnil15 ,

In your script I would add the following line before the gr.calculation.... line.

"gr.field_value = current.caller_id +" - "+current.<insert service field name here>";

 

Then your outcome would be something like "Joe Bloggs - Microsoft" etc

View solution in original post

3 REPLIES 3

Matthew Knight
Tera Guru

Hi @swapnil15 ,

In your script I would add the following line before the gr.calculation.... line.

"gr.field_value = current.caller_id +" - "+current.<insert service field name here>";

 

Then your outcome would be something like "Joe Bloggs - Microsoft" etc

Got it, thanks 🙂

No worries at all glad it helped