Calculate MTTP - Difference between proposed date and promoted date on major incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 06:56 AM
Hi Team,
Can we create the DB view to calculate the MTTP , Please note that propose date is on child incident and promoted date is on parent incidents which is considered as major incident.
if not DB view is there any other way to build the report for MTTP.
Thanks in advance !!
Thanks,
Pampa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 07:48 AM
Hi @pampapathi1
I would have a BR Script on the child table where I calculate the date difference and then convert it into days/hours/minutes and store that information in a new variable so it can be used for reporting.
var startDate = new GlideDateTime(current.variables.proposed_date);
var endDate = new GlideDateTime(current.variables.parent_incident.promoted_date); //Note if there is a reference variable(parent_incident) referencing parent table (or) get details of promoted_date by using Glide record.
var diff = gs.dateDiff(startDate.getDisplayValue(),endDate.getDisplayValue(),true); //This would return seconds
var days = diff/86400; //if needed convert the seconds to Days
Mark as correct and helpful if it solved your query.
Regards,
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2025 08:48 AM
If my response has helped you, could you please mark it correct and close the thread so that it might benefit future readers.
Regards,
Harish