Change category on bulk amount of tickets

morrowc
Kilo Expert

Is there an easy way to move all tickets with one categorization to another and then remove the one category so that we can eliminate tickets being categorized two different ways for the same function?

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

Assuming you're an admin, you can also do it in the front end.


Get a list view that shows only the tickets of Category X.   Right click in the list view header and select "update all"


On the update form that comes up, change the category to what you want.



Done.


View solution in original post

6 REPLIES 6

BenPhillipsSNC
Kilo Guru

Hi Chris,



You can use the list view and use multiple-row selection to do this. See Editing Multiple Records .   If the records are on the order of thousands or higher, you might want to write a GlideRecord query and run it in scripts - background. Something like


var rec = new GlideRecord('incident');
rec.addQuery('category',2);
rec.query();

while (rec.next()) { 
 rec.category = 5;
 rec.update();
}

When you are done reassigning the tickets to your new category, do not try to delete the old category, just make it inactive and/or remove it from the choice lists. Basically, make it so that users will never see it. But don't try to actually delete the choice itself as this can cause unnecessary problems and complications.  


Thanks for the suggestion regarding making old or no longer used categories inactive instead of deleting them.   I'll definitely do this moving forward.


Uncle Rob
Kilo Patron

Assuming you're an admin, you can also do it in the front end.


Get a list view that shows only the tickets of Category X.   Right click in the list view header and select "update all"


On the update form that comes up, change the category to what you want.



Done.