How to move a child task using Project Server 2007 PSI?

T

theArchitect

Hi,

I am writing an application that uses the Project Server 2007 PSI API and
I've hit a roadblock!

I need to be able to move a child task from under one summary task to under
another. In the Project Professional UI this is easy, but I can't seem to
find a way to do this through the PSI.

The ProjectDataset.TaskRow class has a property called TASK_PARENT_UID which
is used to set the task's parent but this is read-only once the task has been
created and can't be updated. I don't see any other methods to allow you to
reassign a tasks parent or move a task under a new parent.

Anyone got any ideas?
 
R

Ray McCoppin

I have had some luck doing this way:
1. Copy the TaskRow into a new Row
2. Delete the old TaskRow in the dataset
3. modify the ProjectDataSet.TaskRow.AddPosition and
ProjectDataSet.TaskRow.AddAfterTaskUID
4. the new row to dataset
5. update the dataset

Hope this helps
--
Ray McCoppin

http://www.randsmanagement.com
Project Server 2007 archival tool
SRS gantt charts
 
T

theArchitect

Thanks Ray for the suggestion.

This almost works! If I store the original Task GUID before deleting it I
can then set the GUID on the cloned task to the same value and this works OK.

However, I have noticed that I lose any resource assignments once the
original task is deleted, so currently I'm trying to figure out how to avoid
or work around that issue.

<Gnash> <Gnash>

Don't suppose you have already figured this one out?

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top