Close the problem record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2023 07:17 PM
Gd mrg to all,
Problem records will auto Close 3 days from the date set to Resolved. All the Related incidents to the Problem will auto-close at the same time. This must also follow any existing rules defined regarding placing the Problem in Resolved status.
please help me to close the problem as well as incidents also
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2023 09:06 PM
You can write a scheduled scripts which will run daily
script
var pr = new GlideRecord('problem');
pr.addQuery('state','value of resolved state');
pr.query();
while(pr.next()){
var now = new GlideDateTime();
var resolvedTime = new GlideDateTIme(pr.resolved);
var diff = GlideDateTime.subtract(resolvedTime,now);
var days = diff.getRoundedDayPart();
if(parseInt(days)==3){
pr.state = backend value of closed
pr.update();
}
}
please mark it as correct and helpful if mu answer satisfies your query