Automatic changes Priority


#1

Hi,

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

image

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

image

Can anyone help me?

Thx.


#2

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:
http://snippet.dhtmlx.com/782555c1a


#3

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”:
image
If I change to “Not started”:
image
If I have “Completed” and “Canceled”:
image
I need to do a list of priority Status that I wanna show based on its children.

Thanks for the help.


#4

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):
http://snippet.dhtmlx.com/f836cc07e