Aug 16 2010

GLPI Ticket User Group Auto Assignment

Published by at 1:28 pm under GLPI

GLPI user has to select the group he belongs to when creating a ticket or else the field remains empty.
This stored procedure automatically assigns all tickets to the user’s group. Setup a cron job on your Mysql server to run it as often as you need.
 

begin
update GLPI_database.glpi_tracking t
set t.fk_group= (
SELECT g.id
   FROM GLPI_database.glpi_users u,
        GLPI_database.glpi_groups g,
        GLPI_database.glpi_users_groups ug
   WHERE u.id = ug.fk_users
   AND g.id = ug.fk_groups
   AND u.id=t.author
   LIMIT 0 , 1)
where t.fk_group is null or t.fk_group='' or t.FK_group=0;
end


Also check out how to do a full hardware inventory of your network with GLPI.


No responses yet

Comments RSS

Leave a Reply