Query to fetch Task Worklog and related entity ID

Query to fetch Task Worklog and related entity ID

DB Compatibility : PGSQL & MSSQL
Build Compatibility : Builds above 9400

SELECT taskdet.TASKID AS "Task ID", taskdet.TITLE AS "Title", taskowner.FIRST_NAME AS "Owner", taskdet.MODULE AS "Module", wotask.WORKORDERID AS "Request ID", taskprob.PROBLEMID AS "Problem ID", taskchange.CHANGEID AS "Change ID", taskproject.PROJECTID AS "Project Id",rctd.FIRST_NAME AS "Worklog Owner",LONGTODATE(ct.TS_STARTTIME) AS "Worklog Start time", LONGTODATE(ct.TS_ENDTIME) AS "Worklog End time", ct.DESCRIPTION AS "Worklog Description" FROM TaskDetails taskdet LEFT JOIN SDUser taskownersdu ON taskdet.OWNERID=taskownersdu.USERID LEFT JOIN AaaUser taskowner ON taskownersdu.USERID=taskowner.USER_ID LEFT JOIN WorkOrderToTaskDetails wototaskdet ON taskdet.TASKID=wototaskdet.TASKID LEFT JOIN WorkOrder wotask ON wototaskdet.WORKORDERID=wotask.WORKORDERID LEFT JOIN ProblemToTaskDetails probtotaskdet ON taskdet.TASKID=probtotaskdet.TASKID LEFT JOIN Problem taskprob ON probtotaskdet.PROBLEMID=taskprob.PROBLEMID LEFT JOIN ChangeToTaskDetails changetotaskdet ON taskdet.TASKID=changetotaskdet.TASKID LEFT JOIN ChangeDetails taskchange ON changetotaskdet.CHANGEID=taskchange.CHANGEID LEFT JOIN TaskToProjects projtotaskdet ON taskdet.TASKID=projtotaskdet.TASKID LEFT JOIN ProjectDetails taskproject ON projtotaskdet.PROJECTID=taskproject.PROJECTID LEFT JOIN TaskToCharge toc ON taskdet.TASKID = toc.TASKID LEFT JOIN ChargesTable ct ON toc.CHARGEID=ct.CHARGEID LEFT JOIN SDUser rcti ON ct.TECHNICIANID=rcti.USERID LEFT JOIN AaaUser rctd ON rcti.USERID=rctd.USER_ID WHERE (taskdet.CREATEDDATE >= <from_thismonth>) AND (taskdet.CREATEDDATE <= <to_thismonth>)


In the above query, you can replace the <from_thismonth> and <to_thismonth> with the desired date filter. You can look for the available list of date filters here - Date Filter


          • Related Articles

          • Task Comments and Description

            This report is used to find the task comments and Description. To make any changes to a query, refer to the KB article below. https://pitstop.manageengine.com/support/manageengine/ShowHomePage.do#Solutions/dv/24000633501275 SELECT taskdet.TASKID AS ...
          • Closed request with pending task

            This report is used to get all completed request with the pending task.     To make any changes to a query, refer to the KB article below. https://pitstop.manageengine.com/support/manageengine/ShowHomePage.do#Solutions/dv/24000633501275 SELECT ...
          • How to automatically create a task in a Change Request.

            This is a sample script to create a task in a Change Request based on the values given in certain fields. This is done by using an API call to create  a task in ServiceDesk Plus. The task can also be created in a request, problem, project or a ...
          • Scheduled Reports

            This report is used to get the complete list of all the scheduled reports with the owner name configured in the application.  SELECT CustomReport_Details.REPORT_NAME "Report Name", AaaUser.FIRST_NAME "Owner" FROM ReportScheduleTask LEFT JOIN ...
          • Advanced Analytics - FAQ & Troubleshooting tips

            Troubleshooting tips This document is listing of customer facing issues,  Advanced analytics is common name for both Zoho reports and Analytics plus.  First setup we have to get with customer that recreate issue and generate support log ...