How do I prevent the project from being closed after all project tasks are closed

lexveldkamp
Tera Contributor

Last check have to be done by Project Office. They would be the one to close the Project.

1 ACCEPTED SOLUTION

Sulabh Garg
Mega Sage
Mega Sage

Hello,

Please check the below thread, you will the solution here.

Restrict Project closure when all Project tasks are closed

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 
Regards
Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

View solution in original post

10 REPLIES 10

Hello Sluabh,

 

My team is looking towards accomplishing the same solution of preventing Projects from being closed as a result of all the Project tasks being closed. In addition we want to also avoid associated Stories from being closed when Projects are closed. I see you left a hyperlink in above response but the link takes me to a page that says 'Archived'. Is there updated instructions? 

Bcrant
Tera Contributor

Were you able to find a resolution to this?

Aman Kumar S
Kilo Patron

Hey,

You can have a before update BR on Project Table, in which you can keep condition as State changes to Closed, and in the script you can glide the change tasks table to check if there is any active record or not.

Sample script:

var projectTasks = new GlideRecord("pm_project_task");
projectTasks.addQuery("parent", current.getUniqueValue());
projectTasks.addActiveQuery();
projectTasks.query();
if(projectTasks.next()){
    gs.addInfoMessage('Project task/tasks are still active.');
    current.setAbortAction(true);
}

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hey @lexveldkamp ,

Didn't hear back on this. I think you marked other response as correct, although your response suggests, my response worked for you.

Is your issue resolved? If yes, feel free to mark helpful/correct, so it will be helpful for others looking for similar query.

Best Regards
Aman Kumar

Attila Beregvar
Tera Guru

The link in the accepted solution points to an archived thread, can someone post what the original solution was? 

Thanks!