- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 11:46 AM
Hello ServiceNow Wizards,
Please advise if any of you have tried this or are aware of any pitfalls to look for for the following approach.
Context: We occasionally have situations where we want to consolidate two in-flight projects, and not lose the time previously booked to the individual projects. We have been able to execute a background script to move a Task (that has processed time cards) from one parent project to another, and it appears to work. The background script basically updates the 'Parent' value of the Project task from Project A to Project B. We want to know if this is a safe practice, or if there are risks/issues we haven’t considered.
Assume that we are only talking about “1 layer deep” tasks, ie tasks that have the Project as their parent, and don’t have any child tasks.
Question: What, if any, would be the concerns/risks/issues with moving (via background script) a Task with time booked to it from one Project to another?
Thanks in advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 01:56 PM
This is available OOB with "Copy partial project" UI action on pm_project table.
https://docs.servicenow.com/bundle/london-it-business-management/page/product/project-management/task/t_CopyExistingTaskorProject.html
You don't need to write custom script to copy tasks from one project to another.
You should advise users to use OOB available functionality instead of running background script every time.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 01:56 PM
This is available OOB with "Copy partial project" UI action on pm_project table.
https://docs.servicenow.com/bundle/london-it-business-management/page/product/project-management/task/t_CopyExistingTaskorProject.html
You don't need to write custom script to copy tasks from one project to another.
You should advise users to use OOB available functionality instead of running background script every time.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2019 07:21 AM
Hello Sachin,
Thanks for your reply. I should have included in the original post.
We tried the OOB way, but that does not move all the associated time cards to the new project. That is the main pre-text for my question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2019 09:03 AM
Since you are talking about one level of project task dependency, your script will work to copy projects and assosiated tasks.
But, if you want to calculate all nested child tasks, then you will have use recursion in your script to copy tasks.
Regards,
Sachin