Content
How do i get Major Work Packages Groups like "Phase" by Project id
Added by Timo Oberthür over 2 years ago
We build up a Service which migrates projects from an ERP System into OpenProjects. For this, we created a template Project includes all the neccessary stuff a new project needs (Milestones, Tasks, Phases). So far so good. I create a call to the API to copy the Project with a new name and now want to fill up some special fields inside the "Phase" Work Package of a Project (I added a user field which i need to fill as kind of tracking nr to the ERP System). I request all Work Packages from the Project but just got all other Work Packages Types without "Phase".
Could you please tell me how to get the "Phase " Work Packages without referencing to the "relations" property of all other Work Packages to find the "Phase" Parent?
Simple Demo:
Project xxx
- Task 1
- Phase xxx1
-- Task 2
-- Task 3
If i request all Work Packages, i just get ...Task1, Task 2, Task 3 but not "Phase xx1"
I hope i was able to write the question proper and readable.
Replies (2)
I figured out that Work Package Type like "Phase" is not copied to a new Project like Tasks do if i call the "Create project copy" in api/v3 . They still remain to the old Template Project and point to it.
Thats sad. Is there an way to Copy the WHOLE Template Project with ALL kind of Work Package Types?
So we figured out there is a way to solve this issue but i still think to copy a whole project should also copy the "Phase" Work Package like all other.
The workaround is to create a own Work Package Type inherit from Phase and this one will get copied like all other Work Packages.
Maybe something for the future to solve?