- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 04:00 AM
Hi All,
One of our managers wants to be able to produce a list of incidents and have a field there for each one saying how long it has been open for. What's the best way to go about this?
I thought the easiest way to do this would be to add a new field to the incident form and add in the calculated value something like:
var opened = current.opened_at.getDisplayValue();
var now = gs.nowDateTime();
var time = gs.dateDiff(opened, now, true);
My first question is, what performance effect (if any) will this have if it is calculating this value for every incident? If it's going to have a knock on performance issue would i be better off making this a metric instead?
If it isn't going to effect performance, how do i present the resulting seconds in a days/hours/minutes/seconds time field?
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 06:17 AM
Hey David,
The problem with Calculated fields is that they don't perpetually calculate in real time. The only calculate on a create or update. Thus you'll never get the "time open" but rather "the amount of time this was open the last time I saved it".
This use case is really best supported by Performance Analytics, where your management would simply look at the oldest tickets (and the pattern of age) and drill in from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 06:56 AM
If I could bring up an earlier answer... Performance Analytics scratches this itch *REALLY* well.
If my concern is age of tickets, an indicator should show me a visual trending of age where I drill into the bad bits. Having a duration field on a list view is useful... in the same way that a bow-drill is useful for creating fire (that is to say, not at all useful if you're carrying matches).
You're going to eyeball scan it either way... so do you want to eyeball 20/40/80 distinct numbers at once? Or do you want to eyeball a graph where you can detect a trend over 5 pixels?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2020 11:21 AM
Hi Robert,
Is it possible to have the same "Time ago" when we export to PDF or Excel?
Thanks,
Regards
Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2020 05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 06:26 AM
Hi David,
You might want to setup SLAs. They are easy to configure and will calculate the Actual and Business Duration. Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 06:30 AM
That'll necessitate the SLA exist on *every* incident, which will permanently skew any SLA reporting they do.
You're borrowing an element of a record with a business function in order to facilitate a view preference for a single person.