Creating a Web Part that Lists Projects with a Specified Custom Field Value

To list all projects that have a specified value of a custom field, the easiest solution is to develop a PSI extension that queries the Reporting database (RDB) in Project Server 2010. When you install the attached ListProjectsWebPart_JSGrid.zip file, the ListProjectsWebPart_JSGrid\ListProjects_PSIExtension subdirectory includes complete code samples to create and test the ListProjects PSI extension. The code sample in the ListProjectsWebPart_JSGrid\ListProjects_WebPart subdirectory creates the ListProjects Web Part that calls the PSI extension and displays a list of projects in a JS Grid control.

The same ListProjects Web Part can be used in Project Web App pages, project detail pages (PDPs), and project site pages (a project site was called a project workspace in Project Server 2007).

The Web Part to List Projects with a Custom Field Value.docx article in the attached ListProjectsWebPart_JSGrid.zip is a draft of procedures that will be included in new articles in the next update of the Project 2010 SDK.

ListProjectsWebPart_JSGrid.zip

Comments

  • Anonymous
    August 24, 2010
    The column sorting functionality for the JS Grid is not implemented in the attached code sample. The next Project 2010 SDK download will include the complete code sample that implements sorting in the grid.

  • Anonymous
    September 11, 2010
    what is the performance impact of calling readproject for each project? On project 2k7 I've had such loops take well over 10 minutes (not the alternative used in the end....)

  • Anonymous
    September 14, 2010
    Jim, Wouldn't it be more efficient to have an index on a text-type custom field (such as a hierarcy list)to work on a subset of the portfolio data? Querying two million tasks across a 1500-project portfolio, even in RDB, to identify similar values could be daunting and very time consuming. Hierarchical lookup lists are more compact. Although not available in PS 2010, having additional breakdown structures to organize key company data would be even better. Each structure would have integrated indexing. --John Andrew Kossey

  • Anonymous
    October 01, 2010
    The calls to ReadProject is done on the server in a PSI extension, and just for the projects that have the specified custom field value. That saves the overhead of making separate PSI calls from the client application, so the performance impact is minimal. It would be interesting to see a performance comparison using the same calls from the client and in the PSI extension, if someone would be able to do that. In addition, Project Server 2010 has implemented a number of performance improvements over Project Server 2007. John -- the SPROC query in the ListProjects PSI extension is to MSP_EpmProject_UserView, and has nothing to do with tasks. Undoubtedly there are performance improvements that could be made; the SDK article shows the essential ideas. For the updated articles, see Developing PSI Extensions (msdn.microsoft.com/.../ff843378.aspx) and Developing Project Server Web Parts (msdn.microsoft.com/.../ff943563.aspx) -- and the subsections -- in the SDK. Thanks, --Jim