#ProjectServer / #ProjectOnline Publish All projects #JavaScript #jQuery #SharePointOnline #Office365 #PS2013
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
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:
The new script is JavaScript so will work for Project Server 2013 and Project Online. The publish all JavaScript file can be downloaded here:
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:
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:
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:
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:
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.