Demands are updated to "Approved" State automatically after Project is created from it, despite Demand being completed


Description

Demands are updated to "Approved" state automatically after Project is created from it, despite Demand being completed.

Resolution

The logic that is updating Demand State to "Approved" upon creating a project from it is hardcoded in (DemandToProjectCreationHelper) script include below:
https://<instance-name>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=20e773609f702200598a5bb0657fcf25

Specifically Line 62 which updates a Demand's state to "Approved" when a Project is created via "Create Project" related link:
demand.state = '8';

The value 8 corresponds to "Approved" on the (dmn_demand) table:
https://<instance-name>.service-now.com/nav_to.do?uri=sys_choice.do?sys_id=ac8057d98f11110040f82ab2f0f9239c