How to prevent Project Task "State" field from locking when creating a child task

Alex Wong
Tera Contributor

Which business rule is responsible for locking (greying out) the "State" field of a parent task when a child task is created? I recently disabled the business rule "Process State Change" on the pm_project_task table to prevent parent tasks from auto-closing when all child tasks have been completed. However, because the parent task's "State" field is locked, I can't change this to closed at a later date.

5 REPLIES 5

Colin Stengs
Kilo Explorer

I can recall this logic was managed on the task or planned_task table. Perhaps look in this direction: SI: PlannedTaskStateUtil. Hope it helps a bit. 

MBarrott
Mega Sage

Hi @Alex Wong - I know this is an old post but did you ever resolve this issue? Encountering it myself now. 

Hi @Alex Wong and @MBarrott ,

My strong recommendation is NOT to change out of the box BRs. In other words, leave the parent task state as locked (auto update)..

 

I think the objective to achieve is to complete certain action items after completion of the last sub task and then only close the parent task.

If my understanding is correct then, it can easily be achieved by creating a milestone task and add the checklist... Unless the user completes the activities mentioned in the milestone checklist and closes the milestone, the parent task will NOT close...

This will help you in multiple ways:

1. You are not changing OOTB BRs hence no risk to upgrade

2. User knows what action items need to be taken care at the end of every task to close that task - No chance of missing the action items

3. Clean approach of getting the things executed in a defined way.

 

Below is the example screenshot:

Screenshot 2024-07-19 at 11.11.05 AM.png

 

Hope this answers the query and if it does, please mark this as a correct answer to help me and other community users.

 

Happy SPM Learning !

 

Thank You!

Namita Mishra

 

Hi @Namita Mishra

 

The issue I'm seeing here is that the parent project task is already a key milestone - these are being used as stage gates for the overall project. The child project tasks are the actual tasks within the respective stage gate. 

 

We're also using the time worked field for these project tasks and with state being marked as read-only we are already experiencing script failures. I'm also seeing that parent project task as remaining open even when all child tasks have been closed which won't work for us.