@done and subtasks

I remembered something about it, but it was not exactly what he asked. The script below marks the project as done with a time-stamp once you finish the last task within the project… Maybe that can be used as a base.