Tags: Office365, PowerShell, PPM, Project 2013, Project 2016, Project Online, SharePoint Online
This blog post will show an option to capture Microsoft’s PPM Project Online data into a SharePoint list on a schedule to enable time driven data capture for snapshot / trend reporting capability. This example makes use of a PowerShell script I created to get the data and write this to a SharePoint list. The PowerShell script will use the Project Reporting OData API to get all of the specified project data in the PWA Site Collection then create a list item on the specified SharePoint list. The user setting up the script will need to update the source PWA instance URL, username, password and list name. The account specified will need access to the OData API in PWA and contribute access to the target SharePoint list. The SharePoint list will also need to be created beforehand with the required columns. The OData query will need to be updated to include the correct project level fields required and the part of the script that creates the list items will need to be updated too. This is covered below.
This script example can be downloaded here: https://gallery.technet.microsoft.com/Online-Snapshot-example-0437b680
To get the script to work you will need to reference the DLL as seen in the image below:
This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.
Please note, this has only been tested in PowerShell 3.0 and might not work in other versions. If you have any issues try this in PowerShell 3.0.
Firstly decide what project level fields you want to capture, this will determine the list column requirements. Then create the SharePoint list in the PWA site collection with the required columns, for this example I created a list called ProjectSnapShots with the columns below:
The SnapshotDate column was set to have today as the default value so that when the items are created the date is set automatically.
Update the Project OData query to include the correct fields that you want to capture, in this simple example I have included the following:
$url = $PWAInstanceURL + "/_api/ProjectData/Projects()?`$Filter=ProjectType ne 7&`$Select=ProjectId,ProjectName,ProjectPercentCompleted,ProjectHealth,ROI,RiskRating&`$orderby=ProjectName"
As you can see I have a list column for each project level field. The next part of the script that needs to be updated is the item creation:
This is where you map the project level fields to the correct SharePoint list columns based on the data you are capturing.
Also ensure the variables have been updated correctly, placeholder values seen below:
Save and run the PowerShell script (fully test on a non-production PWA site collection before Production) to ensure the data is captured correctly in the target SharePoint list. You could then set this up to run as a scheduled task on a local server or a scheduled WebJob in Azure to capture the data weekly or monthly etc. For details on a scheduled WebJob see: https://azure.microsoft.com/en-gb/documentation/articles/web-sites-create-web-jobs/
Once the script is run you will see the data in the SharePoint list, below I have run this 3 times:
You could then create a snapshot / trend report as required from the list data and even join to the live Project OData API if you capture the Project ID as I have in the example script / list.
A simple time driven data capture to enable snapshot / trending reports for Project Online. This script could easily be modified to capture the data into a SQL database, either on-prem or in Azure SQL if required. Also if this was to be run in production the script should be updated for error handling with try / catch blocks etc.
The script is provided "As is" with no warranties etc.
#ProjectServer and #SharePoint 2013 / 2016 August 2016 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProjectAugust 9, 2016 at 8:28 pm | Posted in Administration, CU, Fixes, Functionality, Information | Leave a comment
Tags: Office 2013, Office 2016, Project 2013, Project 2016, Project Server 2013, PS2013
The Office 2016 August 2016 updates and cumulative updates are now available, please see the links below:
Project 2016 August 2016 update:
The Office 2013 August 2016 updates and cumulative updates are now available, please see the links below:
Project Server 2013 August 2016 CU Server Roll up package:
Project Server 2013 August 2016 update:
Project 2013 August 2016 update:
Also worth noting, if you haven’t done so already, install Service Pack 1 http://support2.microsoft.com/kb/2880556 first if installing the August 2016 CU.
As always, fully test these updates on a replica test environment before deploying to production.
#ProjectOnline / SharePoint CSOM updated to include Resource Engagements #Office365 #SharePointOnlineAugust 8, 2016 at 2:33 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information | Leave a comment
Tags: CSOM, Office365, PPM, Project Online
Just a quick post to highlight the latest SharePoint Online / Project Online CSOM version (16.1.5521.1200) now includes the Resource Engagement classes and properties:
Tags: Office365, Power Query, PowerBI, PPM, Project 2013, Project 2016, Project Online
In this post we will look at creating a very basic Power BI report that includes hyperlinks to various entities in Microsoft’s Office 365 PPM Project Online PWA site. The report created here will be purely to show you how to create links to the Project Site, Project Detail Page, Issues and Risks items.
Firstly I will create my OData URLs I need for my datasets, these can be seen below:
- Projects: <PWA site URL>/_api/ProjectData/Projects()?$filter=ProjectType ne 7
- Issues: <PWA site URL>/_api/ProjectData/Issues
- Risks: <PWA site URL>/_api/ProjectData/Risks
Now launch the Power BI desktop and click Get Data > OData Feed as seen below:
Enter the Projects URL and click OK:
On the next screen click Edit:
In the Query Editor window click Choose Columns:
In the Choose Columns window, uncheck all of the columns – quickest way is the uncheck Select All Columns:
Now select the following columns: ProjectId, ProjectName, ProjectWorkspaceInternalUrl
Click OK and the query will only contain those columns:
Rename ProjectName to “Project Name” and ProjectWorkspaceInternalUrl to “Project Site URL”, this is done by right clicking on the column heading and selecting Rename:
I have also changed the query name to Projects:
Now click Add Column > Add Custom Column:
Enter the name “Project Link” and the formula:
"<PWA site URL>/project%20detail%20pages/schedule.aspx?projuid=" & [ProjectId]
Update the PWA site URL to your Project Online PWA site URL and update the PDP if required, this one uses the Schedule PDP.
Click OK. The Projects dataset table is now ready, we now need to add in the Issues data. From within the Query Editor window, click New Source > OData Feed:
Enter the Issues URL and click OK:
Click OK on the preview window then you will see the 2nd query added:
Now we need to Choose Columns, remove them all and select the following: ProjectId, IssueId, ItemRelativeUrlPath, Title
Click OK. Rename the query to Issues then that dataset table is complete:
We now need to add in the Risks data. From within the Query Editor window, click New Source > OData Feed:
Enter the Risks URL and click OK, click OK on the preview window then you will see the 3rd query added:
Now we need to Choose Columns, remove them all and select the following: ProjectId, RiskId, ItemRelativeUrlPath, Title
Click OK. Rename the query to Risks then that dataset table is complete:
Now we need to merge the Issues table with the Projects table so that we can get the Project Site URL in the the Issues table. Select the Issues dataset table then click the Merge Queries option:
In the Merge window select the Projects table and ProjectId from both as seen below:
Click OK and you will see a new column appear:
Click the button on the new column to choose the columns to expand from the joined table:
Select just the Project Site URL:
Click OK and you will see the Project Site URL appear:
Rename the column to remove the NewColumn. prefix. Now click Add Column > Add Custom Column:
Enter a name “Issue Link” then enter the formula for the new column:
[Project Site URL] & "/" & Text.Range([ItemRelativeUrlPath],0,13) & "DispForm.aspx?ID=" & Text.Range([ItemRelativeUrlPath],13,1)
Click OK. Click on a row and ensure the URL is correct – copy in the browser to test:
Now select the Risks dataset table to repeat the steps. Click Merge Queries with the same steps as before and click OK. In the new column expand the Project Site URL then rename the column to remove the NewColumn. prefix. Add the custom column called “Risk Link” with the following formula:
[Project Site URL] & "/" & Text.Range([ItemRelativeUrlPath],0,12) & "DispForm.aspx?ID=" & Text.Range([ItemRelativeUrlPath],12,1)
Click OK then click on a row and ensure the URL is correct – copy in the browser to test:
Then click Close & Apply:
Then the Apply Query Changes window will load whilst the data model loads:
Once loaded, check the table relationships are ok and change if needed:
Now you are ready to build the Project links report as you would normally build a Power BI report. One additional step that you will need to do it make the URL columns into Web Urls. For example, select the “Project Site URL” from the Projects dataset then click the Modelling ribbon and under the Data Category option chose Web URL:
Repeat this for the three custom columns created: Issue Link, Risk Link and Project Link.
A very simple report has been created below to show the hyperlinks:
This is a very plain report as you can see, but this demonstrates how to create hyperlinks to keys areas of the project from a Power BI report.