Help Configuring a Metric Definition to Track Assignment‑Group Duration Across State Changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 06:00 AM
Hello everyone,
I’ve created a Metric Definition on the Incident table with a scripted filter that correctly selects only my target Assignment Group(s). It currently records an interval start whenever the ticket enters a new assignment group. However, I’m encountering two issues:
Missing “end” Timestamp on Resolve→Reopen Cycles
When the incident’s State transitions from In Progress → Resolved (while still in the same Assignment Group), no end timestamp is recorded for the interval.
Consequently, if the ticket later moves back Resolved → In Progress (same group), the metric never “closes” that first interval, so its duration remains open indefinitely.
Closure Only on Incident Close
The metric only closes when the incident itself is marked Closed (e.g. after a week), which isn’t helpful for measuring the elapsed time between In Progress and Resolved.
What I Need
End the interval whenever State changes In Progress → Resolved for the same Assignment Group, recording date + time.
Accumulate durations if the ticket reopens (transition Resolved → In Progress) under the same Assignment Group, appending each new “In Progress” period to the prior total.
Alternatively, end and start a fresh interval whenever the Assignment Group itself changes.
Has anyone implemented a Metric Definition (or Business Rule / Script Include) that:
Detects both Assignment‑Group changes and relevant State transitions (two diferent fields)?
Records an end timestamp on In Progress → Resolved (in a metric when field is assignment roup)?
Accumulates duration across multiple reopen cycles, without waiting until the incident is finally Closed?
Any sample scripts or configuration guidance would be greatly appreciated. Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 01:17 AM
Have you tried creating a database view between the 'state' metric and the 'assignment group' metric definitions?
It feels like there are some things missing to get a complete picture. You mention it only runs on your selected groups, so what happens if it is changed to a different group (one that is not recorded), or if the state and assignment group change?
Could you share the script you are using? Maybe that helps to understand the exact business requirement that you are trying to resolve with this.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 01:28 AM

this is the script that i use too but i cant take only one field and this is assigment group. As you see the last incident start from service desk and change to network all good but when i made the state resolved the end is not taking any price until its be closed. But in incidents anyone can change the state again to somethink else and i want to count the duration until be resolved in network assigment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 01:57 AM
I think that you can only get this to work if you move away from metrics and (mis)use the SLA engine for this. You can run the definitions on any state/group change and record the exact time (even pause it when it goes to another group within the same state and comes back).
I never like using SLA definitions for reporting purposes, but sometimes it's the only way.
At one customer, we also had to do this and we even created an extra SLA Definition type for it (not resolve or response, but 'report'). That way they are easily kept out of any (end user facing) reports and you can even easily exclude them from being shown in the related lists.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 02:04 AM
i try this too to make a sla_breakdown_assignment in sla which priotity is everythink and there is a solution but it worked only for the new incidents, not retrospectives for old archives and if i could make a repair the old ones, i think this could be a problem for the system. Im try to do it now with business rule and try to check from metric the assigment group and from business rule the state...