#ProjectServer / #ProjectOnline Publish All projects #JavaScript #jQuery #SharePointOnline #Office365 #PS2013

This post covers a new script I have written that publishes all projects the user has access to. I do have a PowerShell script that does this perfectly but only works for Project Server on-premise. This is detailed here:

https://pwmather.wordpress.com/2012/05/31/updated-publish-all-projects-in-projectserver-using-powershell-msproject-ps2010-sp2010/

http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-all-45ba385b

The new script is JavaScript so will work for Project Server 2013 and Project Online. The publish all JavaScript file can be downloaded here:

http://gallery.technet.microsoft.com/scriptcenter/Server-2013-Online-Publish-15215a56

To get the script to work you will need to download the following jQuery library:

jquery-1.8.3.min.js – jQuery download

A later version of this library may work but this was the one I used / tested with.

Upload this library to your PWA site collection then update the script file with the correct location. I uploaded this file to the site assets library as you can see in the code below:

image

Also note the references to the default SharePoint / ProjectServer JavaScript libraries.

Once the script is uploaded, save this to the PWA site collection. I uploaded the JavaScript file to the style library:

image

Now create a new page, I called mine PublishAll and saved this in the Site Collection Documents Library library. The name of the page and the location of the page can be changed, just make sure the users have access to it. Then add a content editor web part on the page and reference the publishallprojects.js file. After clicking save you should see the following load:

image

Clicking the Publish Projects button will fire of a publish job for all the projects you have access to. You will see the following pop disappear once all the projects have been sent to the queue for publishing:

image

There are several publish all type apps available in the app store but this method does not require you to install and configure the app store or download and install an app.

2 thoughts on “#ProjectServer / #ProjectOnline Publish All projects #JavaScript #jQuery #SharePointOnline #Office365 #PS2013

  1. Just wondering what “publishes all projects the user has access to” actually means. If I am an admin, does it publish all projects? Does it only publish the projects I own? Little bit confused.

    1. If you are an admin with full access to all projects then yes it will publish all projects. It will not publish just the projects you own, basically it will publish what projects you see when you go to an unfiltered project centre view in PWA.

Comments are closed.

Blog at WordPress.com.

Up ↑