onsdag den 6. august 2014

Order Enterprice Project Types (EPT) in Project Server 2013

In Project Server 2013 I experienced a strange problem today. When trying to order the Enterprise Project Types (EPT) by choosing a new value in the "Choose the type before which the current type should be positioned" dropdown nothing happened in Project Center. The EPT's were just visible in the order they were created in.



This is an error in the current version of Project Server 2013 (SP1, CU1). I could not find any workaround except to delete all the EPT's and create them in the correct order, this would just have been alot of work as we have more than 10 EPT's.
I have never experienced this problem in Project Server 2010, so it must have been introduced in the new version.

To solve the issue i found tracked down the stored procedure which loads the EPT's. By adding a order statement to this stored procedure the list got sorted correctly.
This solution is not supported by Microsoft and might be overwritten in a future hotfix/CU/SP of Project Server.

To install the solution log on to the SQL server where the ProjectWebApp database resides.
Start SQL Server Management Studio and create a new query.
Copy-paste the below script and execute it by pressing F5.
If the ProjectWebApp database has a different name then the standard name replace the "use ProjectWebApp" with the name of the database.

------------------------------------------------------------------------------------------------------------
USE [ProjectWebApp]
GO
/****** Object:  StoredProcedure [pub].[MSP_WORKFLOW_ReadEnterpriseProjectTypes]    Script Date: 5/30/2014 6:53:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [pub].[MSP_WORKFLOW_ReadEnterpriseProjectTypes]
   @layoutsFolder nvarchar (15)
AS
BEGIN

   SELECT
      ept.ENTERPRISE_PROJECT_TYPE_UID,
      ept.ENTERPRISE_PROJECT_TYPE_NAME,
      ept.ENTERPRISE_PROJECT_TYPE_DESCRIPTION,
      ept.WORKFLOW_ASSOCIATION_UID,
      ept.WORKFLOW_ASSOCIATION_NAME,
      ept.IS_DEFAULT_PROJECT_TYPE,
      ept.ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID,
      ept.ENTERPRISE_PROJECT_WORKSPACE_TEMPLATE_NAME,
      ept.ENTERPRISE_PROJECT_TYPE_ORDER,
      ept.IS_MANAGED_PROJECT,
      Replace(ept.ENTERPRISE_PROJECT_TYPE_IMAGE_URL, '$LAYOUTS', @layoutsFolder) as ENTERPRISE_PROJECT_TYPE_IMAGE_URL
   FROM
      pub.MSP_ENTERPRISE_PROJECT_TYPES ept
   ORDER BY ENTERPRISE_PROJECT_TYPE_ORDER

   SELECT
      eptd.ENTERPRISE_PROJECT_TYPE_UID,
      eptd.DEPARTMENT_UID
   FROM
      pub.MSP_ENTERPRISE_PROJECT_TYPE_DEPARTMENTS eptd

   SELECT
      eptp.ENTERPRISE_PROJECT_TYPE_UID,
      eptp.PDP_UID,
      eptp.PDP_ID,
      eptp.PDP_NAME,
      eptp.IS_CREATE_PDP,
      eptp.PDP_POSITION
   FROM
      pub.MSP_ENTERPRISE_PROJECT_TYPE_PDPS eptp

END

Ingen kommentarer:

Send en kommentar