- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2014 10:39 PM
I want to capture the assignment group at the time of SLA breach on task table. So I am using the below code
if (current.active) {
if (current.has_breached.getDisplayValue() == 'true') {
createMetric();
}
}
function createMetric() {
var mi = new MetricInstance(definition, current);
if (mi.metricExists())
return;
var gr = mi.getNewRecord();
gr.field_value = current.task.assignment_group;
gr.calculation_complete = true;
gr.insert();
}
But this isn't capturing any records. Plese advice me where am i doing wrong ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014 11:16 PM
Got the solution. I added metric event for task_sla table and now its working as per my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2015 11:47 AM
Hi Charl -
You can do it via metric scripting as explained here or you can make use of Workflow to trigger when your sla breaches and store it into a custom field.
Thanks,
Reza Rahman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 05:04 PM
Hi Reza,
I am using your script. It's my first time working with Metrics. I have exact same requirement of yours. But I need the Incident assignment group. Can you tell me all the steps necessary to do it?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 12:00 AM
Hi
Would you be able to answer this question?