Bulk Closure of Overdue Changes
Requirement: Bulk close changes with different workflows and roles, filtered based on modifiable criteria as needed.
Steps to configure:
- Login to SDP Application > Navigate to reports
- Create a query report, listing the "ChangeID", "ChangeManager", "ChangeOwner".
- Sample Query: SELECT chdt.CHANGEID AS "ChangeID", chdt.changemanagerid as "ChangeManager", chdt.technicianid as "ChangeOwner" FROM ChangeDetails chdt LEFT JOIN Change_StatusDefinition statusDef ON chdt.WFSTATUSID = statusDef.WFSTATUSID LEFT JOIN ChangeTemplate tempDef ON chdt.TEMPLATEID = tempDef.TEMPLATEID LEFT JOIN Change_StageDefinition stage on stage.wfstageid = chdt.wfstageid WHERE tempDef.NAME = 'Standard Change' AND statusDef.STATUSDISPLAYNAME != 'Completed' or stage.displayname != 'Close' AND chdt.DELETEDTIME IS NULL AND chdt.CREATEDTIME < <from_lastmonth>
- This query can be modified to suit your needs. Current query would list all changes in the "Standard Change" template that are not "Completed" or "Closed," not deleted, and created before the last month.
- Save this report with a name, and in my case i have saved it as "ChangesToBeClosed"
- Go to Admin > Developer Space > Custom Schedule Function > New > Copy paste the contents of CloseChange.txt and save it with a name.
- Update the hosted url and Technician key as per your instance.
- For Integration key/Technician key refer this KB link: https://pitstop.manageengine.com/portal/en/kb/articles/creating-integration-key
- Create an integration key with SDChangeManager role.
- Update the reportName, stage, status, stageID as per your instance. In my case the report name is "ChangesToBeClosed"
- Configure a custom schedule to invoke this newly created custom function, passing the custom query report as a parameter. If needed, this can also be set up on a periodic basis.
New to ADSelfService Plus?
Related Articles
Change Auto closure
This will be helpful in auto closing change request after X days it is in review stage. This use case is more suitable in environments where ONLY Requesters (customers) are the Change Reviewers and they want the Change to be closed if no review is ...
Script: Close associated changes when a request is closed
Use case: In many cases, the client never comes back to confirm the change. This means that the change remains opened indefinitely. When the ticket is closed it is logical that the change to be closed. No one is going to close a ticket unless the ...
Query to show priority changes in the ticket (MSSQL)
Tested in MSSQL build (14306) This query shows which tickets were downgraded from P1. MSSQL: SELECT wo.WORKORDERID AS "Request ID", wo.TITLE AS "Subject", aau.FIRST_NAME AS "Requester", ti.FIRST_NAME AS "Technician", LONGTODATE(wo.DUEBYTIME) "DueBy ...
Script to send notifications to project owner and other users regarding the project closure.
Tested in Latest Build: 14306 Use case: While closing a project in addition to the project owner other users who are not involved in the project can be notified using the below attached Script. Please follow the below steps to achieve the above: 1. ...
Query to show overdue tickets with delay by days
Working on Build's: 14500 PGSQL: SELECT ad.ORG_NAME AS "Account", wo.WORKORDERID AS "Request ID", wos.ISOVERDUE AS "Overdue Status", ad.ORG_NAME AS "Account", CAST (DATE_PART('day', now() - FROM_UNIXTIME(wo.DUEBYTIME /1000)) AS varchar)"Days since ...