Project state change is aborted with error message in pm_project .

Manal  AQUIL
Tera Contributor

Hi Now Community,

Kindly help me to understand how to modify below mentioned OOB functionality :

While trying to change the state of pm_project from WIP to OnHold , it is throwing an error message "Updating project state from Work In Progress to Pending or Open is not allowed. Update all tasks state to Pending to set project state to Pending." And the during this transaction associated project task is in pending state.

 

Moreover, I found that this error is coming from Script Include : "AjaxProjectUtil" but struggling to navigate from where it is getting triggered. (It's not getting triggered from any BR and it's shows nothing in script tracer.)

My requirement is to update pm_project state to onHold for a specific user irrespective project task state (even if they are in pending state).

Thanks and Regards,

Manal Aquil

 

4 REPLIES 4

Chris Everding
ServiceNow Employee
ServiceNow Employee

Hi,

In this context, the AjaxProjectUtil script include is being called from the 'Save' and 'Update' UI Actions on the pm_project table.

Just quickly - has the OOTB Pending state been re-labelled to On Hold?

If this is the case, my suggestion would be to return the state field options to OOTB, and consider creating a different way of identifying a project that is on hold (e.g. a new, complimentary 'Sub-state' field). With this approach you leave OOTB states as they were and we have the added advantage of retaining the state of the project when it was placed on hold, which can help decision making when re-starting these initiatives. 

Thanks,

Chris

Manal  AQUIL
Tera Contributor

Thanks for responding,

I just checked pending is not re-labeled as on Hold rather both pending and on Hold state values are categorized as pending states.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743973

So, even if the state is changed from WIP to pending or WIP to on Hold both the newValue is considered as pending states.

Regards,

Manal Aquil

Hi Manal,

You could play around with creating dictionary overrides for the pm_project table as is documented here -> KB0720080.

But I still maintain, adding in a way to flag a project as being on hold that is separate to the project state is for more useful and results in less technical debt.

Chris

yogesh41
ServiceNow Employee
ServiceNow Employee

Hi,

I think you have changed the label of one of the existing State choice as "OnHold", as I don't see any such State available OOB. There are Workflow and validations associated with each of the OOB State choices and it may impact overall Project as well as respective Tasks. So it is recommend to avoid renaming existing State choices to achieve custom functionality . It is also not recommended to update OOB script include. 

I suggest to introduce new State Choice to achieve custom implementation . Customize a state for project or project task (servicenow.com)

Yogesh