GLPI: Change the category of tickets in mass [Quick Guide]
GLPI computer park management solution allows to classify by categories support tickets. GLPI web interface allows you to mass change the category of a set of tickets to move them from one category to another.
However, this does not work on closed tickets on which it is not possible to make any changes. It would be annoying to change the status of tickets temporarily to move… Besides it’ll generate the notifications so users will not understand everything…
The trick that I use as a solution to this problem and change the category tickets directly concerned in the database . Tested under GLPI 9.1.1.
I invite you to use PhpMyAdmin to access your MySQL in a simple way database management. For information on the Wiki of GLPI, you can find the list of tables is the database (although this list seems incomplete): GLPI – list of tables
Table tickets – glpi_tickets
GLPI contains a table that references all of the tickets, there are different fields as “id”, which is the identifier unique ticket (a number incremented by + 1 to each new ticket), but the field that interests us here is “itilcategories_id” which corresponds to identifier unique to the category to which the ticket is attached.
The table of categories – glpi_dropdown_tracking_category
it may be useful to consult this table to get the ID of the categories concerned by the transfer of tickets. The “ID” field you will get ID unique category clearly indicated in the “Name” field. The “CompleteName” contains the full name, i.e. with parent categories is it y in a.
now for the transfer of tickets from one category to another…
For example, to move the tickets of category ID “82” to the category ID “30” here is the proper SQL query:
UPDATE 'glpi_tickets' SET 'itilcategories_id' = 30 WHERE 'itilcategories_id' = 82;
This query can be sent directly via PhpMyAdmin:
you can make various requests of this kind according to the necessary movements at the level of the categories of tickets. Each time, PhpMyAdmin shows you the number of rows affected, i.e. the number of displaced tickets.
If we refer to the image above, there were 29 tickets IDP category ID “56” to the category ID “30”. That these tickets are closed or not, the category change for taken place.
There are more to apply this procedure on your GLPI if you sometimes encounter this problem.