How to calculate Age of the tickets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 08:26 AM
Hi All,
I want to calculate the age of the incidents on the incident table.
Could some one please help me on starting from creating the Age field and till it calculates the age.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 09:09 AM
Hi Gaurav,
Thanks for the response.
But my requirement is not generate a report or create a performance analytics dashboard.
I want to display the age of the tickets as a field on incident form. For an example : how we have created by , updated by , assignment group etc.. the same way field "Age" which displays the number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 09:10 AM
Hi Sachin,
Thanks for the response.
But my requirement is not generate a report or create a performance analytics dashboard.
I want to display the age of the tickets as a field on incident form. For an example : how we have created by , updated by , assignment group etc.. the same way field "Age" which displays the number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 09:12 AM
Hi Taqdeer,
Any reason why you want to customize, when you have an OOB solution available?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 09:22 AM
You could use SLAs that will automatically track your Incident open time.
If you still want to go with customization route ( which I DO NOT recommend since it's expensive), you can follow below to calculate age on incident form,
1. There is already a 'duration' filed on the Incident table. Just put that on your form. This will display the time since the Incident was created until it reached the 'resolved' state
3. You could place a calculated field on the form. Just create a new field of Type Duration and put the below in the calculation script:
javascript:gs.dateDiff(current.sys_created_on, gs.nowNoTZ(), false);
Note: Calculated fields have a habit of slowing things down, so you may want to calculate this in a Display Business Rule and pass it into the form in the scraptchpad.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2020 09:14 AM
Hi Taqdeer,
You can use the duration field for the same,
Please refer below link for the same.
it contains the creation of aging field in incident table.
Please mark reply as Correct/Helpful, if applicable. Thanks!
Regards,
Tushar