Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 02:01 PM
Hello again Kieran,
I think I may have found a simpler solution. Because the metric I'm using is capturing the duration separate from the value field, I modified the script to set the value to current.assignment_group.name.
function createMetrice(value) {
var gr = mi.getNewRecord();
gr.value = current.assignment_group.name;
gr.start = current.sys_updated_on;
gr.end = gs.nowDateTime();
gr.duration = gs.dateDiff(gr.start.getDisplayValue(), gr.end.getDisplayValue());
gr.calculation_complete = true;
gr.insert();
With this addition, I'm now able to filter the instances based on the value to exclude assignment groups I don't need to count the metric instance for...
I know it's not very elegant because to filter the report requires a perfect match of the assignment group name to but if I could get away with just one metric I'd prefer this method.
What do you think?
Kevin