Change stage history

Change stage history




SELECT chdt.changeid                       "Change ID", 
       chdt.title                          "Title", 
       orgaaa.first_name                   "Requested by", 
       ownaaa.first_name                   "Technician", 
       Longtodate(chdt.createdtime)        "Created Time", 
       Longtodate(chdt.scheduledstarttime) "Scheduled Start Time", 
       Longtodate(chdt.scheduledendtime)   "Scheduled End", 
       Longtodate(chdt.completedtime)      "Completed Time", 
       stagedef.NAME                       "Change Status", 
       aau1.first_name                     "Changed By", 
       Longtodate(cdh.operationtime)       "Changed On", 
       stdp.NAME                           "Changed From", 
       stdc.NAME                           "Changed To" FROM   changedetails chdt 
       LEFT JOIN sduser orgsd 
              ON chdt.initiatorid = orgsd.userid 
       LEFT JOIN aaauser orgaaa 
              ON orgsd.userid = orgaaa.user_id 
       LEFT JOIN sduser ownsd 
              ON chdt.technicianid = ownsd.userid 
       LEFT JOIN aaauser ownaaa 
              ON ownsd.userid = ownaaa.user_id 
       LEFT JOIN change_stagedefinition stagedef 
              ON chdt.stageid = stagedef.wfstageid 
       LEFT JOIN changehistory cdh 
              ON chdt.changeid = cdh.changeid 
       LEFT JOIN changehistorydiff cdhd 
              ON cdh.historyid = cdhd.historyid 
       LEFT JOIN aaauser aau1 
              ON aau1.user_id = cdh.operationownerid 
       LEFT JOIN change_stagedefinition stdp 
              ON Cast(cdhd.prev_value AS VARCHAR) = Cast( 
                 stdp.wfstageid AS VARCHAR) 
       LEFT JOIN change_stagedefinition stdc 
              ON Cast(Cast(cdhd.current_value AS VARCHAR) AS 
                 INT) = stdc.wfstageid 
WHERE  cdhd.columnname IN ( 'WFSTAGEID' ) 
ORDER  BY 1 


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Change Status history

                        SELECT chdt.changeid                       "Change ID",         chdt.title                          "Title",         orgaaa.first_name                   "Requested by",         ownaaa.first_name                   "Technician",  ...
                      • Change roles

                        SELECT chdt.changeid               "Change ID",         chdt.title                  "Title",         orgaaa.first_name           "Change Requester",         ownaaa.first_name           "Change Owner",  ...
                      • Change approval

                        SELECT chdt.CHANGEID AS "Change ID", chdt.TITLE AS "Title", orgaaa.FIRST_NAME AS "Change Requester", qd.QUEUENAME AS "Group", ownaaa.FIRST_NAME AS "Change Owner", catadef.CATEGORYNAME AS "Category", priodef1.PRIORITYNAME AS "Priority", ...
                      • Close change requests using custom schedules.

                        This post describes the use of a python script to close change that are in a specific stage using Custom Schedules.   Use Case: There may be a scenario where number of old Change Requests that have gotten lost in the shuffle over the years. Most of ...
                      • Technician change from history

                        This report is used to find who changed the Technician and how many technician handled the request.  To make any changes to a query, refer to the KB article below. ...