create a project with a specified owner

  • Thread starter Stephan Steiner
  • Start date
S

Stephan Steiner

Hi

I'm creating projects via PDS. I can set both Creator and Manager fields,
but they seem to be of only informational nature. I must be going blind
because even in the database, I cannot find the project owner anywhere, and
all my projects are owned (and thus managed) by the user I used to log in to
the project server.

So how can I create a project that is owned by a specific user known to the
system? I suppose logging into PDS using the user's credentials works, but
if I could just get the plaintext AD password for each user, that would be a
security nightmare so this cannot be the solution.

Also, how can I programmatically transfer project and task ownership (I'm
not afraid of SQL but I just cannot find ownership information in the db
tables).

Regards
Stephan
 
R

Ray McCoppin

I have done this by changing the owner after creating the project like this:
using PDS calls

Check out the project
like this

<Request>
<ProjectCodeValues>
<ProjectID>5677</ProjectID>
<AutoCheckout>1</AutoCheckout>
</ProjectCodeValues>
</Request>

change the owner field:
notice that column UID of 99999 is Owner and the ValueUID is the res_euid of
the new owner from the database.

<Request>
<ProjectCodeValuesUpdate>
<ProjectID>524</ProjectID>
<AutoCheckin>1</AutoCheckin>
<Columns>
<Column>
<UID>99999</UID>
<ValueUID>106</ValueUID>
</Column>
</Columns>
</ProjectCodeValuesUpdate>
</Request>


Check the project back in...
 
G

Gérard Ducouret

Hi Ray,
Can we read directly this "Owner" field in a Project Server data base ? If
so, where ?
Thanks

Gérard
 
R

Ray McCoppin

The owner field is in the MSP_WEB_PROJECTS table, it is the WRES_ID field
this needs to lookup into the MSP_WEB_RESOURCES table for the actual Name.
Soo the SQL query you need might look like this:

SELECT MSP_WEB_PROJECTS.PROJ_NAME AS [Project Name],
MSP_WEB_RESOURCES.RES_NAME AS Owner
FROM MSP_WEB_PROJECTS INNER JOIN
MSP_WEB_RESOURCES ON MSP_WEB_PROJECTS.WRES_ID =
MSP_WEB_RESOURCES.WRES_ID
 

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