Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 04:48 AM
Hello Experts,
I am seeking guidance on a requirement to close problem tickets that have not had any incidents for 7 days. I attempted to fulfill this requirement using a scheduled job, but unfortunately, my script is not functioning as expected. Could someone please assist me with this? Thank you.
var prb=new GlideRecord('problem');
prb.addEncodedQuery('stateNOT IN106,107^related_incidents=0');
prb.setLimit(1);
prb.query();
while(prb.next())
{
prb.state=107;
prb.fix_notes=" test Scheduled Job";
prb.update();
}
Solved! Go to Solution.