I read through the Javascript library documentation and did not seem to find the setParent functionality.
in that case, can anyone help with how to assign an existing task with a parent task?
The asana JS library helps out a lot and I am kind of new with coding, so I haven’t gotten into actually using the JS http curl request yet
In the doc it says “The parent of this task, or null if this is not a subtask. This property cannot be modified using a PUT request but you can change it with the setParent endpoint. You can create subtasks by using the subtasks endpoint.”
Did you try to call this endpoint?
Thanks for pointing out the endpoint, think I figured it out using the node request module
needed to use the json option instead of using body
var request = require( ‘request’)
var personalAccessToken = { personal access token }
var parenttaskid = { parent task gid }
var subtaskid = { existing task gid to set as subtask }
var headers = {
‘Authorization’: 'Bearer ’ + personalAccessToken
};
var jsondata = {“data”: {‘parent’ : parenttaskid}}