ForumsDevelopersDelete task containing subtasks


Delete task containing subtasks
Author Message
Benjamin Leclerc

Posted: Nov 17, 2012
Score: 0 Reference
Hi,

Deleting a task containing subtasks via the API actually deletes the task and all the subtasks.

Is it normal ?
Shouldn't the subtasks be simply changed to normal tasks instead of being deleted ?
Was it already like that before ?

Thanks
Jake

Toodledo Founder
Posted: Nov 19, 2012
Score: 0 Reference
Deleting a parent task will always delete the subtasks, just like it does on our main website. If you want to change the behavior for your users, you will first need to edit the subtasks so that they have no parent, and then delete the empty parent task.
Benjamin Leclerc

Posted: Nov 19, 2012
Score: 0 Reference
I think this is really a problem in the API.
Because how do I know (in an efficient way of course) that a task that I delete, will also delete some subtasks ?

For example I have in Toodledo:
- A
--- B

Then in the third party app I do the following:
Move B as task (not subtask anymore)
and remove A:
- B

If I follow the schema in the API, I will first delete A, which will also remove B.

The update date will be corrupted, because I didn't wanted to delete B actually, but in my third party app I don't know anymore that B was a subtask of A.

Then what do I do with B ?
Did the user deleted B ? Or is it deleted because it was a subtask of A ?

I think, since it's an API with basic CRUD operations, it shouldn't do automated things like this.

Would it be possible to add a paramater to the delete command to avoid the deletion of the subtasks ?

Thanks
Jake

Toodledo Founder
Posted: Nov 19, 2012
Score: 0 Reference
I will look into this. In the meantime, if your app supports moving subtasks, you will need to sync the moves before you sync the deletes.
You cannot reply yet

U Back to topic home

R Post a reply

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