I am trying to change the parent of a new Google task created using Google Scripts. Since the parent must be changed using "move," I'm trying the following:
var oldtask = Tasks.Tasks.get(TASK_LIST_ID, TASK_ID);
var newtask = Tasks.newTask();
newtask.title = oldtask.title;
newtask.position = oldtask.position;
newtask.notes = oldtask.notes;
Tasks.Tasks.move (TASK_LIST_ID,newtask.id,oldtask.parent);
The last line throws Extra args block must be a javascript object literal. when running it from the Google Scripts editor. I have tried multiple different formats and have the feeling this is an easy fix.
This is my first post here so please let me know if you need more info.