I currently have three tasks: task1, task2, and task3. Task2 depends on task1, while task3 depends on both task1 and task2. I would like to automatically set a block status for the dependent tasks when their respective dependencies are not marked as "done". Conversely, when the dependencies are marked as "done", I would like to automatically set the tasks as "Todo". Specifically, when the status of task1 is not "done", it should automatically set both task2 and task3 as "block". When the status of Task1 is "done", it should automatically set Task2 as "Todo".

I have attempted numerous approaches without success. Please advise on how I can achieve the desired outcome.