Need script to alread existing incident where reassignment count is 1 but no group changed in ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 06:30 AM
when incidents are getting created via inbound action, reassignment count showing as 1.
which was fixed but I want script to edit previous incidents where reassignment count i 1 but no group changed.
this has happened for few incidents intermittently, not for all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:12 AM
Hi @nitin51
You can write code in Fix Script to reduce reassignment count by 1 for given list of incident.
var incidentList = "numberININC1,INC2,INC3"; // replace INC1,INC2,INC3 with the actual incident number
var grINC = new GlideRecord("incident");
grINC.addQuery(incidentList ); // update the incidentList variable with actual incident numbers
grINC.addQuery("reassignment_count>0"); // Check for this condition
grINC.query();
while(grINC.next()){
grINC.reassignment_count = grINC.reassignment_count-1;
grINC.udpate();
}
Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:19 AM
Hi Ashish,
Thanks very much,
As issue in intermittent, it has happened with few incidents.
is it possible to get those incident via any query??
If not I don't have option, but to manually update the incidents in script and run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:53 AM - edited 02-22-2024 10:06 AM
How do you know that "it happened with few incidents", either you have list of such incidents or someone reported this observation.
So with that assumption, you need to perform "due diligence" and find out the business impact and if it's minor thing then don't update this count, leave it.
You can apply filter on List View where this "reassignment count" is more than 0 ( add more applicable condition, if applied )
I can guess, some business team who is mainly concern about "reporting metrics" may ask this to update.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution