Mass updates and publishing

P

PatF

does anyone have experience creating some sort of server-side batch routine
to publish PS 2007 files in bulk that could be set to run nightly. The
scenario would be: for all projects for [fieldX]="abc" then open, save,
publish, close, check in. I estimate that the condition would be true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
P

PatF

thanks Stephen,

basically I have several Project Center views that include custom fields
with graphical indicators driven by formulas, things like date field
comaprisons to current date, etc. but the indicators only change with new
publishing.

I would like to mass publish files to see indicator changes regardless of
whether or not the PM has published recently

Stephen Sanderlin said:
There's various ways of doing this, but before we get into that, what
are you trying to accomplish by a bulk publish?

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



does anyone have experience creating some sort of server-side batch routine
to publish PS 2007 files in bulk that could be set to run nightly. The
scenario would be: for all projects for [fieldX]="abc" then open, save,
publish, close, check in. I estimate that the condition would be true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
S

Stephen Sanderlin

PatF,

No problem -- thanks for the response.

Using the PSI, you'll want to pull the projects (I recommend using
ReadProjectEntities for ProjectCustomFields only), iterate through them
to find ones that meet your desired criteria, then call
QueueUpdateProject, then call QueuePublish. Pretty easy stuff. Just make
sure you put in plenty of error checking. You should also be careful to
consider the impact of an auto-publish if your organization is such that
PMs leave changes in a project that they don't necessarily want
published.

I'm not sure off the top of my head whether QueueUpdateProject will work
with an empty dataset, but regardless of whether it does or not I
recommend making a new custom field that contains the date/time that a
project was autopublished. That way you're submitting something to
QueueUpdateProject and you also have some sort of log (unless you want
to go to the trouble of writing to the event and/or ULS logs).

You may want to consider writing a PSI extension to filter the projects
and simply return a list of Project GUIDs that match your criteria. This
would offload most of the data processing onto the server, but the
feasibility of this effort really depends on your server load and your
experience with .NET/PSI/Project Server.

In the interest of full disclosure, you should be aware that your
request is no small undertaking. If this is your first time doing custom
development with the PSI (or with .NET in general), you're probably in
for some significant frustration as you traverse what will likely be a
pretty steep learning curve.

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



thanks Stephen,

basically I have several Project Center views that include custom fields
with graphical indicators driven by formulas, things like date field
comaprisons to current date, etc. but the indicators only change with new
publishing.

I would like to mass publish files to see indicator changes regardless of
whether or not the PM has published recently

:

There's various ways of doing this, but before we get into that, what
are you trying to accomplish by a bulk publish?

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



does anyone have experience creating some sort of server-side batch routine
to publish PS 2007 files in bulk that could be set to run nightly. The
scenario would be: for all projects for [fieldX]="abc" then open, save,
publish, close, check in. I estimate that the condition would be true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
R

Rod Gill

Alternatively the whole lot can be done in about 20 lines of VBA code,
opening projects in Project pro (getting names from reporting db where the
custom field can also be read) then using Project to re-publish! Slower but
much quicker and easier to code.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Stephen Sanderlin said:
PatF,

No problem -- thanks for the response.

Using the PSI, you'll want to pull the projects (I recommend using
ReadProjectEntities for ProjectCustomFields only), iterate through them to
find ones that meet your desired criteria, then call QueueUpdateProject,
then call QueuePublish. Pretty easy stuff. Just make sure you put in
plenty of error checking. You should also be careful to consider the
impact of an auto-publish if your organization is such that PMs leave
changes in a project that they don't necessarily want published.

I'm not sure off the top of my head whether QueueUpdateProject will work
with an empty dataset, but regardless of whether it does or not I
recommend making a new custom field that contains the date/time that a
project was autopublished. That way you're submitting something to
QueueUpdateProject and you also have some sort of log (unless you want to
go to the trouble of writing to the event and/or ULS logs).

You may want to consider writing a PSI extension to filter the projects
and simply return a list of Project GUIDs that match your criteria. This
would offload most of the data processing onto the server, but the
feasibility of this effort really depends on your server load and your
experience with .NET/PSI/Project Server.

In the interest of full disclosure, you should be aware that your request
is no small undertaking. If this is your first time doing custom
development with the PSI (or with .NET in general), you're probably in for
some significant frustration as you traverse what will likely be a pretty
steep learning curve.

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



thanks Stephen,

basically I have several Project Center views that include custom fields
with graphical indicators driven by formulas, things like date field
comaprisons to current date, etc. but the indicators only change with
new
publishing.

I would like to mass publish files to see indicator changes regardless of
whether or not the PM has published recently

:

There's various ways of doing this, but before we get into that, what
are you trying to accomplish by a bulk publish?

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com
does anyone have experience creating some sort of server-side batch
routine
to publish PS 2007 files in bulk that could be set to run nightly.
The
scenario would be: for all projects for [fieldX]="abc" then open,
save,
publish, close, check in. I estimate that the condition would be
true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
J

Jono

I am currently working on exactly the same problem. I need to re-publish
projects on mass to refresh Indicators / calculated custom fields in project
center.

If you are going down the PSI road I can share my learning curve with you...
I have spent days working on this.

Regards
Jono

Rod Gill said:
Alternatively the whole lot can be done in about 20 lines of VBA code,
opening projects in Project pro (getting names from reporting db where the
custom field can also be read) then using Project to re-publish! Slower but
much quicker and easier to code.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Stephen Sanderlin said:
PatF,

No problem -- thanks for the response.

Using the PSI, you'll want to pull the projects (I recommend using
ReadProjectEntities for ProjectCustomFields only), iterate through them to
find ones that meet your desired criteria, then call QueueUpdateProject,
then call QueuePublish. Pretty easy stuff. Just make sure you put in
plenty of error checking. You should also be careful to consider the
impact of an auto-publish if your organization is such that PMs leave
changes in a project that they don't necessarily want published.

I'm not sure off the top of my head whether QueueUpdateProject will work
with an empty dataset, but regardless of whether it does or not I
recommend making a new custom field that contains the date/time that a
project was autopublished. That way you're submitting something to
QueueUpdateProject and you also have some sort of log (unless you want to
go to the trouble of writing to the event and/or ULS logs).

You may want to consider writing a PSI extension to filter the projects
and simply return a list of Project GUIDs that match your criteria. This
would offload most of the data processing onto the server, but the
feasibility of this effort really depends on your server load and your
experience with .NET/PSI/Project Server.

In the interest of full disclosure, you should be aware that your request
is no small undertaking. If this is your first time doing custom
development with the PSI (or with .NET in general), you're probably in for
some significant frustration as you traverse what will likely be a pretty
steep learning curve.

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



thanks Stephen,

basically I have several Project Center views that include custom fields
with graphical indicators driven by formulas, things like date field
comaprisons to current date, etc. but the indicators only change with
new
publishing.

I would like to mass publish files to see indicator changes regardless of
whether or not the PM has published recently

:


There's various ways of doing this, but before we get into that, what
are you trying to accomplish by a bulk publish?

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com





does anyone have experience creating some sort of server-side batch
routine
to publish PS 2007 files in bulk that could be set to run nightly.
The
scenario would be: for all projects for [fieldX]="abc" then open,
save,
publish, close, check in. I estimate that the condition would be
true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
J

Jono

Hi,

Regarding refreshing Custom Fields using the PSI.

We have a situation where a Project manager creates a new Calculated Project
Custom Field and adds it to a View. All projects that have not been republish
via Project pro have empty values in the new custom field. However when you
republish with Project Pro the calulation is fired and the custom field
contains a value.....Very Simple.

The problem is when you want to refresh projects is Project center using the
PSI. QueuePublish or QueueUpdateProject does not refresh / Recalulate custom
fields.

The reason why it does not refresh against a project is because the
assocoation between the Project and the master custom field has not been
made. Project Pro automaticaly creates a new association when you publish a
project.

So... You need to check which custom fields have been associated to a
project and then Add missing custom fields using QueueAddToProject...

If anyone knows of another way PLEASE let me know.....Hope this helps...

Jono
 
S

Stephen Sanderlin

See my reply to your other post.

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com



Hi,

Regarding refreshing Custom Fields using the PSI.

We have a situation where a Project manager creates a new Calculated Project
Custom Field and adds it to a View. All projects that have not been republish
via Project pro have empty values in the new custom field. However when you
republish with Project Pro the calulation is fired and the custom field
contains a value.....Very Simple.

The problem is when you want to refresh projects is Project center using the
PSI. QueuePublish or QueueUpdateProject does not refresh / Recalulate custom
fields.

The reason why it does not refresh against a project is because the
assocoation between the Project and the master custom field has not been
made. Project Pro automaticaly creates a new association when you publish a
project.

So... You need to check which custom fields have been associated to a
project and then Add missing custom fields using QueueAddToProject...

If anyone knows of another way PLEASE let me know.....Hope this helps...

Jono

:

does anyone have experience creating some sort of server-side batch routine
to publish PS 2007 files in bulk that could be set to run nightly. The
scenario would be: for all projects for [fieldX]="abc" then open, save,
publish, close, check in. I estimate that the condition would be true for
about 20% of the 2500+ files on the server.

thanks, PatF
 
J

Jono

Hi,

I can now refresh SOME projects custom fields.

I investigating an issue when a project level custom field is a formula base
and its formula uses a Task level custom field. My current thinking is that
the PSI call to QueueAddToProject iterates through a custom field
dependency.... IE all dependant custom fields must be assigned to a project
before the parent custom field is assigned.

I believe this to be the case as I can only assign a project level formula
based custom field to a Project if all the dependant project level custom
fields have been created. So my code now assigns all static project level
custom fields to a project before if assigns Indicator / Formula project
level custom fields..... This works.
This is the case for Sharepoint that is all child custom fields of a formula
field need to be created prior to creating the formula field.
Any input / ideas would be great full... As I am fighting a delivery clock
and I am way behind :(


Jono said:
Hi,

Regarding refreshing Custom Fields using the PSI.

We have a situation where a Project manager creates a new Calculated Project
Custom Field and adds it to a View. All projects that have not been republish
via Project pro have empty values in the new custom field. However when you
republish with Project Pro the calulation is fired and the custom field
contains a value.....Very Simple.

The problem is when you want to refresh projects is Project center using the
PSI. QueuePublish or QueueUpdateProject does not refresh / Recalulate custom
fields.

The reason why it does not refresh against a project is because the
assocoation between the Project and the master custom field has not been
made. Project Pro automaticaly creates a new association when you publish a
project.

So... You need to check which custom fields have been associated to a
project and then Add missing custom fields using QueueAddToProject...

If anyone knows of another way PLEASE let me know.....Hope this helps...

Jono

PatF said:
does anyone have experience creating some sort of server-side batch routine
to publish PS 2007 files in bulk that could be set to run nightly. The
scenario would be: for all projects for [fieldX]="abc" then open, save,
publish, close, check in. I estimate that the condition would be true for
about 20% of the 2500+ files on the server.

thanks, PatF
 

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