Automatic changes Priority



I need to change Project’s priority based on its task, for exemple:


If I change Task #1.2 to 'High" I want Task #1 automatic changes to ‘High’ as well:


Can anyone help me?



Hello Arthur,
You can do that in the onAfterTaskUpdate event handler. There you can get the parent task and iterate over all its children. If at least one task has High priority, you save that value and cancel other iterations. For normal priority you iterate over all tasks. If no tasks have high or normal priority, you will get low priority for the parent. Here is an example of how it might be implemented:


Thanks for the help, but what can I do to change by status and not priority like this snippet if I have more than 3 options?
So if I have “In progress”:
If I change to “Not started”:
If I have “Completed” and “Canceled”:
I need to do a list of priority Status that I wanna show based on its children.

Thanks for the help.


Hello Arthur,
In that case, you just need to define the logic to change the status of the parent task.
Here is an example of how it might be implemented (the comments are included):