need help to create report which shows number of days between when Ticket was Opened and Closed for a particular month
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 08:06 PM
need help to create report which shows number of days between when Ticket was Opened and Closed for a particular month
For e.g I can see using attached query that there were 1500 tickets created and closed in Jan 2022 however can I create a report some how to show for how long each ticket was opened for ?
E.g - Ticket created on 2 Jan 2022 , closed on 4th Jan 2022 >> number of days ticket was opened for is 2 days
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 08:43 PM
Hi
with respect to this requirement you need to create a custom field and you can store the difference in that custom field and show that field in report based on your report type.
and for getting difference between 2 dates you can refer the below code as sample.
var gdt1 = new GlideDateTime("2011-08-28 09:00:00");
var gdt2 = new GlideDateTime("2011-08-31 08:00:00");
var dur = new GlideDuration();
var dur = GlideDateTime.subtract(gdt1, gdt2); //the difference between gdt1 and gdt2
gs.print(dur.getDisplayValue());
Thanks and Regards
Sure Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 09:02 PM
Hi
you don't need a custom. You can leverage so-called function fields for reporting where the calculation is done really easily.
And there is a Performance Analytics episode which handles function fields in reports: https://www.youtube.com/watch?v=jHc5YLXfU_o
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 09:56 PM
thanks ill try that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2022 08:11 PM
Hi
In case you think I was able to answer your question, I would be happy if you mark the appropriate response as "correct" so that the question will appear as resolved for other users who may have a similar question in the future.
If not, please tell me what you are still missing.
Many thanks & kind regards
Maik