Adding dependent tasks to Projects

I'm working on a Project Management app and have adding tasks as an object. I'd like to make it possible to select another task as a predecessor (setting the status of the task as "ready" based on the "completed" status of the predecessor)

Has anyone tried this?

Not specifically but you can relate an object to itself if that helps.