- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 07:00 AM
One of our team members alerted me to this weird behavior. After she changes the state of a Project from Active to On-Hold, it changes all of the Project Tasks to On-Hold (to be expected). However, when she changes the Project State from On-Hold back to Active, it changes all of the Project Tasks to Active, including the ones that were previously Closed Complete. As a result team members need to go in and re-close any tasks that have already been Closed Completed.
Does anyone know if this is expected behavior or where I can go to modify the script so it excludes the "Closed Complete" Project Tasks
Thanks,
Richelle
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 08:13 AM
The Project State generally should not be set directly. You should allow ServiceNow to calculate it.
Project state is assigned to a specific "state bucket" based on the combination of the Project Task states. Whenever you update the state of a Project Task, the Project's overall state bucket is recalculated, and if the state bucket changes the Project state will update accordingly (usually to whatever you have defined as the default state for that bucket).
If you manually move the Project from one state bucket to another state bucket, a similar recalculation occurs in the opposite direction. For example, if a Project is in a "Closed Cancelled" state, and you manually change it to "Open", the Project will move from the Closed state bucket to the Open state bucket. The only way a Project's overall state bucket can calculate to Open is if all Project Tasks are in the Open state bucket, so in order to make your manual state change correct, ServiceNow will have to move all Project Tasks to an Open state.
I am going to take a guess here based on the behavior you've described: "Active" is mapped to the Open state bucket in your instance, and "On-Hold" is either mapped to the Work in Progress state bucket, or you haven't mapped it at all. When some Project Tasks are in the Closed bucket and some are still in the Open/Pending/Work in Progress buckets, the overall state bucket of the Project will always calculate to Work in Progress. Having some tasks set to On-Hold and some to Closed Complete would allow the overall Project state to be set to On-Hold, since this is a Work in Progress state. However, when you manually specify an "Active" state for the Project, ServiceNow cannot leave the Closed tasks in a Closed state, because you have specifically told it that the calculated combination of Project Task states must evaluate to the Open state bucket. For this to happen, all Project Tasks must be in the Open state bucket.
With the London release, ServiceNow introduced new client scripts to prevent users from accidentally switching a Project from one calculated state bucket to another. So a user will not be able to switch from "On Hold" (which is probably in the Work in Progress state bucket) to "Active" (which is probably in the Open state bucket), since this would force Project Task states to change. Because of this, you will find that in London you must specifically map all of your custom states to a bucket or you will not be able to use them.
Here is some info about overall Project state bucket calculations:
- Open state bucket: All children are in the Open state bucket
- Pending state bucket: All children are in the Pending state bucket
- Work in Progress state bucket: Children are either all in Work in Progress, or in any combination of various states
- Skipped state bucket: All children are in the Skipped state bucket
- Closed state bucket: All children are in the Closed state bucket
Here is information from the ServiceNow docs on how to map your custom states to the appropriate buckets:
Customize a state for project or project task
Useful tip: It is possible to map a given state to more than one state bucket. For example, in our instances, our custom On Hold state is mapped at the Project level (pm_project table) to both the Pending and Work in Progress state buckets.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2019 04:20 PM
Hi
I have read all the above to get a better understanding on the project life cycle and how it is reported.
I would be tempted to make Project State also read only since it is apparently derived from calculations. But I can't really decide as I understand too little yet how this works in SN.
There is also the Phase field which (in New York - only version I know) is very dominant on top of the form and also on the Analytics tab of Project Workspace. Is the phase field not influenced by any script included and/or business rules? Just pure to
Yet better, where do I go to get smarter on what the relationships and constraints between phase, buckets and states, complete with all the OOB values?
Thanks, Peter