Script to convert an Analyst to End user

Version 3

    Verified Product Versions

    Service Desk 7.7.xService Desk 2016.x


    Requirement to convert an analyst to end user.

    From version 7.2.6 there is no need to use the scripts as you can now change an users type from within the Administration component in Console.  Just locate the record that you want to amend and select the Change Type action from the menu.



    You need to run every part of the script separately. I have divided the script in the way it's best run.


    You will always enter the tps_name of the Analyst that you wish to convert. If you are unsure of how to enter this in, you can run a select script to be able to see this. (I have added this in at the very bottom in case you need it) I only converted one analyst when testing this, so I suggest doing it one at a time to make sure it’s all working.


    When you run every script please make sure that you get message (1 row(s) affected) or the change hasn’t been made.


    In this script it's set up towards a user called "Amy Peters" just so you easily can see where to add in the Analyst’s name. So if your Analyst’s tps_name is: Anna Smith, then you would like to enter: ……………tps_name in('Anna Smith'))


    --1. ----------------------------------------------------------------------------------

    --Change the users from 'Analyst' to 'End User' class.


    update tps_user

    set tps_user_type_guid =(select tps_guid from tps_user_type where tps_name = 'EndUser') where tps_guid in(select tps_guid from tps_user where tps_name in('Amy Peters'))



    --2. ----------------------------------------------------------------------------------


    --Delete the GUID values for the above user(s) so that they are no longer recognised as Analysts within 'Administration'


    delete from tps_analyst

    where tps_guid in (select tps_guid from tps_user where tps_name in('Amy Peters'))



    --3. ----------------------------------------------------------------------------------


    --change the licence type the user(s) are using.


    update tps_user

    set tps_user_licence_type_guid = (select tps_guid from tps_user_licence_type where tps_name = 'End User') where tps_name in ('Amy Peters')





    If you need to find exactly how to enter the analyst’s name in to the script, please run the below select script:


    select tps_name

    from tps_user

    order by tps_name


    It will give you a full list of all the users that you have, so might be a long list, but it will order them so shouldn’t be too hard to find the one you are ookinor.


    ITBM All Versions