The Report "Tasks Completed by Team" only returns Tasks whose Parent is Incident - How do I make the Parent Service Request?

Version 1

    Details

    The Report "Tasks Completed by Team" only returns Tasks whose parent is Incident - How do I make the parent Service Request?


    Resolution

     

    The "Tasks Completed by Team" Report OOTB contains a sql query and parameters that query Tasks with "parentlink_category = Incident"

    To alter the OOTB Tasks Completed by Team Report to retrieve Tasks that are children of Service Request - replace the query with the following: 

    Select Task.AssignmentID, Task.Subject as TaskSubject, (Select p.displayname from Employee pwhere p.loginid =Task.Owner) as TaskOwner,

    Task.OwnerTeam as TaskTeam, Task.Details, s.ServiceReqNumber, s.Subject, s.Status, s.OwnerTeam,s.Owner, s.CreatedDateTime, s.LastModDateTime, s.Source from Task,

    ServiceReq s where Task.ParentLink_Category = 'servicereq' and task.ParentLink_recId = s.RecIdand task.Status = 'Completed'

    and Task.OwnerTeam in (@UserTeam)

    and Task.createddatetime >=(@st_date) and task.Createddatetime <= (@en_date)


    **Note that each field that is in the report will need to be modified to reflect service request (by name and by query)**