- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:48 AM
As reopen count of incidents are increasing again and again and i need to create a problem ticket for every 30 reopen incident, that is the reopen count reaches 30 it create one problem ticket. When the same event comes again then the new event create and the reopen count in that incident reaches 30 new problem ticket create and the same is going on , please suggest any flow or something which helps to resolve the issue.
Solved! Go to Solution.
- Labels:
-
Event Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 03:39 AM - edited 01-30-2024 03:59 AM
Hello @mirza_saquib -
You can write after update Business rule ,
(function executeRule(current, previous /*null when async*/) {
// Check if the incident has been reopened
if (current.state == 2 && previous.state == 7) {
// Increment the reopen count
var reopenCount = current.reopen_count ;
// Check if the reopen count is a multiple of 30
if (reopenCount % 30 === 0) {
// Create a new problem ticket
var problemGr = new GlideRecord('problem');
problemGr.short_description = 'Auto-generated problem ticket for multiple incident reopens';
// Add any additional fields as needed
var problemSysId = problemGr.insert();
gs.info('Created a new problem ticket with Sys ID: ' + problemSysId);
}
}
})(current, previous);
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Pratiksha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 02:13 AM
Hi there,
Out-of-the-box, there is a field reopen count. You could create a flow which triggers on the reopen count. Have you tried that? Sounds like zero code involved.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 11:23 PM - edited 01-30-2024 11:24 PM
Hi @Mark Roethof,
I tried that functionality. I can create a problem ticket using flow , but when the problem resolved incident closed and if same event trigger again it will create new incident and repeates the same process. I am unable to perform this highlighted part.
Thanks & Regards
Mirza Saquib Beg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 11:34 PM
Please share what you tried, perhaps a small mistake you made.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 02:40 AM
You Can Write a Flow or BR when Reopen_Count>=30
Table: incident
Advanced: true
Update: true
When: After
conditions: current.reopen_count>=30
Script:
var prb = new GlideRecord('problem');
prb.newRecord();
prb.short_description = current.short_description;
// copy other fields here as needed
prb.insert()
Regards
RP