ForumsDevelopersError 13 - invalid parent ID when adding a subtask


Error 13 - invalid parent ID when adding a subtask
Author Message
andrew

Posted: Feb 17, 2011
Score: 0 Reference
Hi,

In TaskAngel we sync tasks using your recommended sequence - adds, then deletes, then edits. But this has started giving 'invalid parent id' errors, in the following scenario:

1. Starting position: task B is a subtask of task A
2. Ungroup task B so it is no longer a subtask
3. Add task C as a subtask to task B
4. Sync, gives the error

The error happens because the add is trying to make task C as a subtask of B before B has been ungrouped from task A, because that is done by an edit, which is a later sync step.

We haven't had this error reported before. Perhaps you are doing more checks in the API now. Do you have a preferred method for resolving this scenario? Currently my best thought is to collect failed adds and retry them after all the edits have been done.

Thanks,
Andrew
Jake

Toodledo Founder
Posted: Feb 17, 2011
Score: 0 Reference
Yes, you could collect them and retry them after the edits happen.

What we do in our app is skip over any errors and essentially keep the task as dirty in the app and continue syncing the remainder of the stuff. Then, when the sync is complete, if there were any errors, we just immediately sync again. This will pick up any chicken-egg dependency problems.
andrew

Posted: Feb 18, 2011
Score: 0 Reference
OK I'll try that, thanks.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.