- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 06:29 AM
Is it possible to modify the OOB assignment group metric to display a different value? my goal is to display the previous group along with the new group:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 06:31 AM
Hi @bekfro ,
Yes, you can modify but best practice to copy the OOTB and update as per required logic. Keep the OOTP as it is.
This will help during the version upgrade to avoid any additional skipped update.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 06:31 AM
Hi @bekfro ,
Yes, you can modify but best practice to copy the OOTB and update as per required logic. Keep the OOTP as it is.
This will help during the version upgrade to avoid any additional skipped update.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 06:36 AM
Thanks AshishKM, i need assistance with the script to set the value to differently or I actually have a metric capturing the start time of the group changes but its not calculate the end and duration like the OOB field duration metric
createMetric();
function createMetric() {
var mi = new MetricInstance(definition, current);
var gr = mi.getNewRecord();
if (current.u_previous_assignment_group=="") {
gr.start = current.sys_updated_on; //calculate start of assignment based on updated value
gr.value = current.assignment_group.getDisplayValue(); //assign the current assignment group , first group assignment
gr.calculation_complete = true;
gr.insert();
}
else {
gr.start = current.sys_updated_on; //calculate start of assignment based on updated value
//assign previous assignment group by concatening with the current assignment group , and use the value field
gr.value = current.u_previous_assignment_group + ' -> ' + current.assignment_group.getDisplayValue();
gr.calculation_complete = true;
gr.insert();
}
}