How to fetch change task details associated with a change request ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 05:05 AM
Hi All,
I am trying to get the details of a change request usign the JSON service.
In the response , I am not able to find any change task details. Kindly let me know how to get the change task details assiciated with a change request.
Thanks!
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 08:14 AM
We will try the rest api option. We don't have access to rest api as of now.
Also, we are able to get the change details and ctask details if we have the numbers separately as stated above. Is there any way to get ctask associated with a change ?
In the ctask, I can see the change number but from change number can we get the associated ctask numbers ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 08:16 AM
As noted before, you need to get the change (parent) before you can get the change tasks (children). That's the way the relationship in the database is set up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 11:30 PM
Hi Chuck,
When we get the change details based on change number we cant see the ctask number in it that are associated with that change.
We are using the below mentioned URL :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2017 06:27 AM
That is correct, Neetu. You are doing a query for a specific record on the change_request table. By default, it does not return all related records in the system. For that you either need to a) keep the sys_id of the change_request record retrieved and make a second query against the change_task table, or b) create a scripted REST API to do this all in one request for you - as noted before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 03:04 AM
Hi Chuck - my end goal is something like this...
for CIs x,y and z
with associated Tasks scheduled to start or end in between 2 dates
return...
Change 100 (parent)
- Task (child)
- Task (child)
- Task (child)
Change 193 (parent)
- Task (child)
- Task (child)
- Task (child)
etc, etc....
What is the best way to do that via REST? I would think lots of people would have this requirement to see a list of upcoming Changes and all the Tasks under each - so if this requires a scripted REST API then could ServiceNow provide one for everybody? Rather than us all reinventing the wheel.
Thanks!