📜 ⬆️ ⬇️

Adaptation of Microsoft Project Server 2010 to the specifics of the company's project management system

We want to share our experience refining Microsoft Project Server 2010 to the specific requirements of the customer.

This article may be of interest to both business users who may learn about the new features of the platform as applied to their own company, and technicians who can learn from the article new knowledge about how to refine Microsoft Project Server 2010.

Small introduction


In large companies, project management is strictly regulated by company standards. As a rule, all projects have an unambiguous classification and a clearly defined project life cycle. Plus, a large number of simultaneously executed projects and a large number of specialists employed in projects from various departments.
')
The project management information system should ideally provide the following functionality (far from complete, but, in general, sufficient):


Moreover, the information system should flexibly adapt to the company's internal standards, ranging from a customizable project classification system to customizable areas for the teamwork of the project team, providing all the required functionality.

One of the options considered by companies as the basis for building a corporate project management system is Microsoft Project Server 2010 (2013). But is it possible to use it for the company's requests practically “out of the box” or with minimal modifications and as far as it is possible and convenient - the question is open.

If there are no questions with the functionality of calendar-network planning and resource management of a project, then by default the functionality of the project workspace provided by Microsoft Project Server 2010 (2013) is not so bright.

Formulation of the problem


Let's give an example of a real project.

The project is organized according to the classical methodology and includes the stages: Initiation, Planning, Implementation, Monitoring and Control, Closing.

Let us stop at the stages of project initiation and planning. What we want from the system (ideally) is the creation of a project according to company standards and the mechanism (functionality) for collective work on project evaluation and planning, including:

Task 1. Create a project containing all the necessary attributes according to the internal standards of the company. For example, project codes according to the internal budget and portfolio classification.

Task 2. Automatically obtain, after creating a project, a work area providing the main functionality for generating baseline data for a project, namely:


We emphasize that the requirements for the workspace (Task 2) are important for us, because in the early stages of the project, various employees (not always with the skills to work with Microsoft Project) participate in team work and we need to provide them with a comfortable mechanism for working in a familiar user interface.

Review solution out of the box


What can we get when using Microsoft Project Server 2010 with the “default” settings and how will it meet our expectations?

Task 1. Create a project containing all the necessary attributes according to the internal standards of the company. For example, project codes according to the internal budget and portfolio classification.

We can get all the extended attributes of the project using the custom fields mechanism , the main advantage of which is the automatic entry into the reporting databases and the ability to build analytics on top of them.

The only drawback is that we cannot automatically generate project codes based on the type of project and other attributes that classify it.

Task 2. Automatically obtain, after creating a project, a workspace providing the main functionality for generating baseline data for a project.

Everything is not so rosy here: when using Microsoft Project Server 2010 (2013) with minimal settings, we can only get a standard project workspace containing:

  1. Documents;
  2. Risks;
  3. Questions




Standard project workspace (to enlarge, open pictures in a new tab)

Thus, the preliminary result is the following - Microsoft Project Server 2010 (2013) without significant improvements copes well with the collective work of project management in terms of calendar-network planning and resource management, issues and risks, but is poorly adapted for comfortable work with the formation of project passport indicators , financial planning of the project, contract work and project workflow in general.

Is it possible to find a compromise and "little blood" to expand and modify the basic functionality of Microsoft Project Server 2010?

Answer: "Yes" and more on that below.

Refinement Microsoft Project Server. Technical aspects


So what can be done to achieve the desired result?

Task 1 . When creating the project, we lacked the functionality of the automatic coding of the project, depending on its characteristics.

From a technical point of view, the organization uses the identification of projects using the codes that are defined when creating the project. Those. task when creating a project it is necessary to generate for it a code in the following format PRJ [project type specifier] [activity] [numbers within the chosen type and direction]. For this, the MS Project mechanism called the project event handlers is quite suitable. Those. On the project creation event, you need to hang up a handler that will generate the required code. How to write the required field value?

To work directly with the field, you need a proxy build for Project Server Web Api, called PSI, ProjectServerServices.dll. It should be noted that working with PSI is very specific, since All actions are done using a specialized DataSet, and information about it is somewhat fragmented. Id of the required field can be obtained, for example, with the help of this article http://msdn.microsoft.com/en-us/library/office/ms453399(v=office.15).aspx , further:

//read project information var projectDS = ProjectSvc.ReadProject(ProjectUID, SvcProject.DataStoreEnum.WorkingStore); foreach (ProjectDataSet.ProjectCustomFieldsRow cfRow in projectDS.ProjectCustomFields) { //if field exists, just update it if (cfRow.MD_PROP_UID.ToString() == id.ToString()) { //update the value cfRow.TEXT_VALUE = code; customFieldFound = true; } } 


After which the project must be returned.

 //create a new job id jobId = Guid.NewGuid(); //checkin the updated project bool force = false; string sessionDescription = "updated custom fields"; ProjectSvc.QueueCheckInProject(jobId, ProjectUID, force, sessionId, sessionDescription); 


And publish.

 //create a new job id jobId = Guid.NewGuid(); bool fullPublish = false; ProjectSvc.QueuePublish(jobId, ProjectUID, fullPublish, EndpointAddressProjectSvc.Uri.ToString()) 


Task 2 . Automatically get after the creation of the project workspace, providing the basic functionality of the formation of basic data on the project (preparation of the project passport).

So, what constitutes a standard MS SharePoint Workspace: this is a site created using a special template that contains lists of documents, questions and risks. Now we want to get a node template that has rich functionality.

The first question is how to create a site definition that can be used as a template for an MS SharePoint workspace. There are two ways:

  1. Create a Sandboxed solution, which is based on the standard PWS workspace.
  2. Create farm solution site definition.

Consider both options:

Sandboxed solution or Site-Definitions is a tincture of an existing workspace. Its advantage is that the created workspace will immediately appear in the administration interface. However, the limitations of sandboxed solutions are pretty strong. For example, you can not access the database, and we in fact just that and want. To display the various data connections directly to Microsoft Project and the workspace.

Farm Solution. The advantage is obvious, we have full access to OM SharePoint, we can call data from various sources. But how to make Project-Site Site-Definition valid for use as a workspace template? Google could not help us in due time. So, we are arming IL-Spy or Reflector and go:

The best place to start is the “Enterprise Project Type Details” page (\ PWA \ ADMIN \ EnterpriseProjectTypeDetails.aspx) from where, after a series of calls, we come to the Microsoft.Office.Project.Server.dll and ReadWssInstalledLanguagesAndWebTempalates (...) class
Microsoft.Office.Project.Server.BusinessLayer.Admin what can we see there ...

  foreach (SPWebTemplate sPWebTemplate in sPWebTemplateCollection) { if (sPWebTemplate.ID >= 6000 && sPWebTemplate.ID <= 6220) { dataRow = webTemplatesTable.NewRow(); dataRow["LanguageId"] = sPLanguage.LCID; dataRow["TemplateName"] = sPWebTemplate.Name; dataRow["TemplateTitle"] = sPWebTemplate.Title; dataRow["TemplateId"] = sPWebTemplate.ID; webTemplatesTable.Rows.Add(dataRow); } } 


So everything is simple: ID - and this is the same ID, which is set in webtemp _ ***. Xml - must be in the range from 6000 to 6220. However, this is not all: if you make SiteDefinition with the desired ID, it will actually appear on the page “Enterprise Project Type Details”. However, the creation of such a site will fall. Why?

Answer: in the AddOrChangeProjectWorkspaceAddress (...) method of the class Microsoft.Office.Project.Server.BusinessLayer.Project. If you analyze the code carefully, you can see that it relies on the existence of PWSIssues, PWSRisk, and PWSDocLibs sheets. You can add the appropriate Feature to our SiteDefinition, or you can simply add the Feature PWS to onet.xml, which adds everything you need.

 <!--Activate PWS Feature --> <Feature ID="90014905-433F-4a06-8A61-FD153A27A2B5"> <Properties xmlns="http://schemas.microsoft.com/sharepoint/"> <Property Key="InheritGlobalNavigation" Value="false"/> <Property Key="OnQuickLaunch" Value="false"/> <Property Key="InheritCurrentNavigation" Value="false"/> <Property Key="IncludeSubSites" Value="false"/> <Property Key="IncludePages" Value="False"/> </Properties> </Feature> 


What is actually not surprising, because the standard Site Definition PWS is a site with this feature activated.
Important!!! The creation of the workspace takes place in the “Microsoft Project Server Queue Service 2010” service, therefore it is necessary to restart it when there are changes in SiteDefinition.

What will be our working area? This will be a set of lists with specific data. And a set of pages that display different slices from these lists, as well as the ProjectServer_Reporting database.

This raises 2 questions:

  1. How to make a data connection using the minimum amount of code?
  2. How to select data that relate to the current project?

Item 1. DataFormWebPart and its AggregateDataSourcse are well suited for the connection. A brief summary here is as follows: we select data from all sources, and then make the connection at the xsl level. Example:

 <cc1:AggregateDataSource runat="server" RowsName="" SeparateRoot="true" RootName="" IsSynchronous=""> <Sources> <cc1:SPSqlDataSource runat="server" AllowIntegratedSecurity="False" ConnectionString="" <%$ connectionStrings:.._ConnectionString %>" SelectCommand="SELECT TOP 1000 [] as WorkResults, [TaskIndex], [TaskOutlineNumber], [TaskUID],cast(cast(TaskWork as decimal(9,2)) AS FLOAT) as TaskWork,[TaskName] FROM [ProjectServer_Reporting].[dbo].[MSP_EpmTask_UserView] TV INNER JOIN [ProjectServer_Reporting].[dbo].[MSP_EpmProject] PR ON TV.ProjectUID = PR.ProjectUID WHERE PR.ProjectUID = @ProjUid " ID="SqlDataSource1"> <SelectParameters> <asp:controlparameter name="ProjUid" controlid="PlaceHolderMain$wspp" propertyname="ProjUid"/> </SelectParameters> </cc1:SPSqlDataSource> <cc1:SPDataSource runat="server" DataSourceMode="List" SelectCommand="..."/> <cc1:SPDataSource runat="server" DataSourceMode="List" SelectCommand="..."/> <cc1:SPDataSource runat="server" DataSourceMode="List" SelectCommand="..."/> </Sources> <Aggregate> <concat name="data source"> <concat name="data source"> <datasource name="TasksInfo" id="0" /> <datasource name="ProjectPhases" id="1" /> <datasource name="ProjectWorkSteps" id="2" /> <datasource name="Contracts" id="3" /> </concat> </Aggregate> </cc1:AggregateDataSource> 


Looking at this code, it is easy to understand, see the SPSqlDataSource set for accessing the database and the SPDataSource for accessing lists. All that remains is to write an .xsl that will display them in the desired form.

Item 2 . And here comes the second problem. How to select data, in this case Tasks, which relate directly to the current project, and not to others? There are two options:

a. Focus on the URL of the workspace. And already in the request to calculate the ProjUid on the MSP_EpmProject table.
b. However, there is a second option: ProjUid for MS Sharepoint workspaces is recorded in the properties of SPWeb, in the MSPWAPROJUID field, so you can write the simplest control that returns it:

  public class WSProjectProperties : WebControl { public String ProjUid { get { if (SPContext.Current == null) return null; if (SPContext.Current.Web == null) return null; return SPContext.Current.Web.AllProperties[“MSPWAPROJUID”] as string; } } } 


And its value is already passed to the DataSource, as shown in the previous example.

What do we get in the end?

Refinement Microsoft Project Server. Results.


As a result, after a little effort instead of a standard workspace, we can get a full-fledged tool for teamwork in accordance with our requirements:




















































* indicators marked in red are automatically generated based on actual data from the Microsoft Project 2010 schedule or the company's financial systems.




* information about the project stages, the composition of the work by stages and deadlines is generated in real time based on the schedule data from Microsoft Project 2010, and information on the achievement of project milestones is based on the documents placed in the project library.

That is, the necessary requirements have been met, the results have been achieved with fairly small labor costs.

Conclusion


Using this example, based on a real project, we have shown that the tasks associated with the adaptation of Microsoft Project Server 2010 to the specifics of the company's activities and the improvement of the ergonomics of working with the system are possible and achievable.

Examples of the implementation of the project workspace are given on the basis of the specifics of the activities of an individual company and serve as an example of the fact that using the methods given in the article, Microsoft Project Server 2010 can be adapted to the specifics of the project activities of any company.

Similarly, in addition to teamwork related to project planning, the tasks of working with project operational data can be solved, in particular:

Source: https://habr.com/ru/post/216063/


All Articles