- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 06:02 AM
Fuji
When a project manager changes the project state to any of the Closed states (Closed Complete, Closed Incomplete, Closed Skipped) the project percentage complete changes to 100% as a result of all of the Project tasks being changes to 100%.
We would like to preserve the state of the project tasks and reflect the actual % complete. We may close a project incomplete at 83% and always want to be able to see the actual % complete.
Can anyone provide any guidance?
Thanks,
Kevin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 04:06 AM
Yes that is how we have designed the system.
But looks like this is a very small customization you can make from your end.
The code which does this is the Business Rule "Process State Change" on pm_project table.
In that code towards the end you will see the following lines
if (current.active.changesTo(false) ) {
gs.info("Task has been closed");
if( current.top_task == current.sys_id ){
if(projectAction) {
current.percent_complete = 100;
gs.info("Closing the Children with Current State: " + current.state);
PlannedTaskUtilsV2.closeChildren(current,current.state);
}
}else if (!projectAction && ((origSysId == current.sys_id) || current.rollup)){
if (!current.rollup)
current.percent_complete = 100;
gs.info("Starting the Successors - State: " + openState);
// start successor tasks
PlannedTaskUtilsV2.startSuccessors(current,PlannedTaskStateUtil.OPEN_STATES);
gs.info("Setting the Parent State: " + closeState);
// check parent for close dependencies
PlannedTaskUtilsV2.setParentState(current);
}
}
Over here the code I have shown in bold text is the one which sets Project to 100% when it becomes inactive.
Probably over there you can do a simple check and update the same like this
if ( current.state == 3 )
current.percent_complete = 100;
In the above piece of code I am setting percent complete only state is 3 (which is Closed Complete), else it will retain the current value.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2016 07:33 PM
Hi Kevin - were you able to find a solution for this yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2016 05:00 AM
Hi Kelly,
Unfortunately not, my SN partner told me that was as designed. Seems like something that should be configurable but haven't found the solution just yet. Right now I have the team refraining from closing out projects that are not 100% complete until I can find one.
Thanks,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 04:06 AM
Yes that is how we have designed the system.
But looks like this is a very small customization you can make from your end.
The code which does this is the Business Rule "Process State Change" on pm_project table.
In that code towards the end you will see the following lines
if (current.active.changesTo(false) ) {
gs.info("Task has been closed");
if( current.top_task == current.sys_id ){
if(projectAction) {
current.percent_complete = 100;
gs.info("Closing the Children with Current State: " + current.state);
PlannedTaskUtilsV2.closeChildren(current,current.state);
}
}else if (!projectAction && ((origSysId == current.sys_id) || current.rollup)){
if (!current.rollup)
current.percent_complete = 100;
gs.info("Starting the Successors - State: " + openState);
// start successor tasks
PlannedTaskUtilsV2.startSuccessors(current,PlannedTaskStateUtil.OPEN_STATES);
gs.info("Setting the Parent State: " + closeState);
// check parent for close dependencies
PlannedTaskUtilsV2.setParentState(current);
}
}
Over here the code I have shown in bold text is the one which sets Project to 100% when it becomes inactive.
Probably over there you can do a simple check and update the same like this
if ( current.state == 3 )
current.percent_complete = 100;
In the above piece of code I am setting percent complete only state is 3 (which is Closed Complete), else it will retain the current value.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 06:52 AM
Could you please help with the code in updated version of above code seems to be old