Creating an External Content Type for Project Risks

In this post, I will talk about how to surface the custom SQL view we developed in the previous post through External Content Types and SharePoint Business Connectivity Services (BCS).

Now this isn’t a new topic.  The only difference is that we’re using it to surface risk information.  For more information on deploying ECT against Project Server, please see one of my older posts.

….and, er….that’s pretty much it.  Not sure how much more I can add to that.  Once you’ve done that against the new custom SQL view, it will look something like this:

image

Next up….adding the data to an external list.

Creating an External Content Type for Project Risks

First Look: Project Server TFS Demo Image

Microsoft released the much awaited Project Server TFS demo image a couple of weeks ago, and I sat down this weekend to actually start working with it and getting some hands on experience.  This post is not necessarily meant as a highly technical article, but more a first response, archive of my notes, and hopefully provide some assistance to other folks working through the demo image.  If I can save someone else some time, great.

This post is specifically written for the demo image released on 4/20 and should not be construed as providing technical guidance for a production installation of the Project Server – TFS connector.  All command lines have been tested on the demo image and the demo image only.

Getting Acquainted With the Image

First off, you’ll want to get familiar with the user accounts that you’ll be using for the demo.  As near as I can tell, there are basically three:

  1. Administrator – Contoso\Administrator
  2. Lina Abola (PM) – Contoso\LinaA
  3. Peder Thode (DevMgr) – Contoso\PederT

Also note that the password on this image is different than the usual one used on other Contoso images.  For more information, you’ll have to download the image and see the accompanying support documentation.

Someone has thoughtfully included the ZoomIt presentation app on the C drive.  Great!

Getting Acquainted With the Admin Interface

After playing around with the scripts and trying out some of the scenarios, you’ll probably want to familiarize yourself with the command line interface – partly to look under the covers and partly to troubleshoot issues you may have found during the demo scenarios.

To access the command line, log into the environment as the administrator.  From the Start menu, select the Visual Studio Command Prompt.

image

The most useful command I found was the option to save the log file.  This helped tremendously in trying to troubleshoot why or when data was pushed back and forth from Project Server to TFS.  Tailored specifically to the demo environment configuration, the following command will yield the log file:

TFSAdmin ProjectServer /GetSyncMessages /Collection:http://tfspsdemo:8080/tfs/ >c:\output.xls

The output only includes errors, so if everything is working, you probably won’t see much in the file.  Copy and paste the text into the command prompt and you’ll get a raw Excel document. 

image

Add a table and some formatting, and you’ll get something like this:

image

…much easier to identify a specific project and why it may not be moving data back and forth.

The second command that I thought was helpful was the command to download the field mapping between Project Server and TFS.  Just to see what fields were indeed mapped, the following command did the trick:

TFSAdmin ProjectServer /DownloadFieldMappings /Collection:http://tfspsdemo:8080/tfs /FilePath:c:\fieldmappings.xml

Open with Excel and you get the following easy to read table:

image

Other Useful Commands

Here are some other commands tailored specifically for the demo image.  If you’re walking into a demo situation, you may want to have these copied into a text file and handy should you need them…

(For the full list of available commands, please see the MSDN article: http://msdn.microsoft.com/en-us/library/gg412656.aspx)

TFSAdmin ProjectServer /GetSyncMessages /Collection:http://tfspsdemo:8080/tfs/ >c:\output.xls

TFSAdmin ProjectServer /GetRegisteredPWA /tfs:http://tfspsdemo:8080/tfs

TFSAdmin ProjectServer /GetMappedCollections /tfs:http://tfspsdemo:8080/tfs

TFSAdmin ProjectServer /GetMappedProjects /Collection:http://tfspsdemo:8080/tfs

TFSAdmin ProjectServer /MapPlanToTeamProject /Collection:http://tfspsdemo:8080/tfs /EnterpriseProject:”Project Server Project Name” /TeamProject:”TFS Project Name”  (Only works after the project has been published in Project Server.)

TFSAdmin ProjectServer /GetMappedWorkItemTypes /Collection:http://tfspsdemo:8080/tfs /TeamProject:”TFS Project Name”

TFSAdmin ProjectServer /MapWorkItemTypes /Collection:http://tfspsdemo:8080/tfs /TeamProject:”TFS Project Name” /WorkItemTypes:”Type1,Type2″ (You’ll need to tailor the work item types to the options in the TFS template using that syntax.)

TFSAdmin ProjectServer /DownloadFieldMappings /Collection:http://tfspsdemo:8080/tfs /FilePath:c:\fieldmappings.xml

Project and Project Server Tweaks

I also ended up making the following tweaks to the demo environment:

  1. Change the time zone to something more local.  There’s nothing more distracting than looking at the displayed time during a demo and seeing it totally off – or maybe that’s just my OCD.
  2. If you plan to show how to create new Project Server projects, and map them to TFS, you’ll probably want to take the Team Foundation Gantt (Project Server) view out of one of the demo projects and copy it into the Enterprise Global.  Make sure to grab the corresponding table, and then to change the names slightly so you don’t get a conflict on opening the demo projects.  Finally, go into the view in eGlobal and confirm it’s pointed at the right table.
  3. Save and publish a project.  Watch the queue.  The queue seems to be stuck more often than not when I open up the image.  Restart the Event and Queue services and everything works fine.
  4. Set the site provisioning settings to manual.  That way, it won’t create a site every time you create a test project.
  5. Turn off the automatic Windows updates in the Control Panel.  I inadvertently left the network adapter connected after activating the image and found out about this one.  Windows Updates are set to download and install automatically – potentially kicking off a restart in the middle of a demo.  Set it to never check for updates.

And finally, for an optimal experience, if you plan to use Microsoft Project from your host machine to log into the Hyper V machine, make sure you have Team Explorer running, and the add-in active in Microsoft Project.  If that is absolutely impossible, you could get by with adding the Work Item Type (TFS) enterprise field to the default Microsoft Project view, but the experience is suboptimal – and it seems to break the functionality to roll up multiple resources from subtasks in TFS to tasks in Project Server.

Watch the log for errors along the line of “TF287005: An item that was changed does not contain a value for the work item type…” to see if that may be an issue.  It appears to relate to the fact that the same data should be in both the local Text30 field and the enterprise field – which can be done manually or automatically with the help of the Team Explorer add-in.

Other Random Interesting Things

A couple of other things that may explain observed behavior:

  1. Sync’d tasks become Fixed Work automatically unless the system is instructed otherwise.
  2. Exporting from Project to TFS sometimes seems to take a while.  If the data hasn’t been pushed over yet, check the logs.  If the logs are empty, then most likely everything is working, but you need to refresh the TFS query.
First Look: Project Server TFS Demo Image

Creating a My Projects View

With the expansion of Project Server 2010 to include enhanced capabilities in browser-based project creation, I have found many organizations hard pressed to manage the sheer numbers of projects that now appear in the Project Center view.

This post documents a quick and easy view that may be created within the Project Center view to filter projects on only those projects where the user is the owner, essentially creating a “My Projects” view.

This technique is based on two assumptions:

  1. Your organization, like many organizations, allows project managers to see all projects read-only – or at least all projects within specific parameters.
  2. Your organization is using a more or less default security model (whatever that means).  Let’s say that your security model isn’t too crazy and hopefully is compatible with this configuration.

Create the View

Navigate to the Manage View option within Server Settings.

image

Make a copy of the Project Center Summary View.  Note that I like to prefix any custom view with a “*” and the company name.  This allows me to easily identify the more commonly used views.

image

Take the view out of every category but the My Projects category.

image

Confirm Security Settings

For the next step, we’re going to review the My Projects security settings as applied to the Project Manager group.  Within Server Settings, navigate to the option to Manage Categories.

Click on the My Projects category. 

image

Note the default settings for the category.

image

Uncheck two of the boxes so the settings look like this.

image

Note that this may have some unintended consequences as the Team Members may be using that category to view projects to which they have been assigned.  If you believe that changing this security model may have a significant impact on your organization, simply copy the My Projects category in the beginning and then follow the same instructions.

The end result should be a filtered list of personal projects within the Project Center view.

Creating a My Projects View

Creating a Centralized Document Repository with External Content Types

The last couple posts I’ve written have focused on using External Content Types (ECT), a feature delivered within SharePoint 2010 as part of the Business Connectivity Service.  This post continues that discussion with an example of creating a shared document repository across multiple projects within Project Server.

I discussed a different type of implementation of similar functionality in a previous post.  in that example, I used an attachment-enabled list to allow users to upload documents via the Project Detail Pages (PDP).  From a user perspective, this would involve navigating to each individual project within the Project Center, navigating to the correct PDP, and then uploading the document.  Similarly, to review the documents, you would have to navigate to each project.

This post is slightly different.  Suppose you needed to perform a batch upload – you had a couple documents for each project that you wanted to upload in a single interface.  ….or suppose that you needed to see all of these documents in a single library, despite the fact that they may be attached to different projects.

image

My guess as to the most typical usage model for this kind of implementation would be where the PMO performs an administrative function and batch uploads specific documents.  Those documents are then available for consumption by the various project team members from the PDP interface.

Create the ECT

Follow the instructions in this post to create the ECT.

Make sure to add a filter to the Read List operation as documented in this post.

Create the Document Library

From PWA, select the View All Site Content option under the Site Actions menu.

image

Create a document library.

image

Navigate to the Library Settings.

image

Within the Library Settings, choose the option to Create Column.

image

Configure the new field as depicted in the following illustration.  This will allow users to select the project name and tag the document with the project unique identifier.

image

Test the document library.  Navigate to the main document library and add a document.  Confirm that the document metadata includes the option to enter the project name.

image

Review the uploaded document to confirm that the ProjUID field is populated properly.

image

You now have a centralized document repository with project level metadata in the PWA site.

Adding the Documents to a Project Detail Page

Adding a filtered view of the document library to a PDP is now quite easy.  Create a new PDP and add two webparts: the query string filter webpart and the newly created document library.

image

Modify the query string webpart to pull the ProjUID parameter from the PDP URL.

image

Now connect the webparts so the query string filter webpart filters the documents in the library by the ProjUID field.

image

Add the PDP to the correct Enterprise Project Type, and you now have the filtered data surfaced within a PDP.

image

Creating a Centralized Document Repository with External Content Types