onsdag den 27. august 2014

Stay updated with the "Project Blog News" app

Today Projectum have released a new app that summarized information from all the best Project Server and Project client blogs out there (including this blog).
This is very useful if you want to keep your users updated with the latest news in project world. The app can be downloaded from the SharePoint store and it can be added to both SharePoint and Project Server installations (online and onPremise). Just search for "Project Blog News".
The app is simple to use. After you install it place the app part "Project Blog News" on any page you like.
Here it is added to the PWA front page.

The app is currently having a price tag of 1.99 USD.

fredag den 8. august 2014

ProjectPublish - ReportingProjectChangeMessageFailed - FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID"

I often recieve this error message at our customers, 9 out of 10 times it is because the Project Server Reporting database is out of sync with publish database.
The solution is to rebuild the database. See below.

Error message from queue:
 •     Reporting message processor failed:   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='05540895-3c37-41ca-a02b-8572d0d3ab68' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='5313a512-da56-481d-a9b0-7bf8ebcbf564' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='b12c9639-f86c-47e3-af28-9b016b5f576a' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='cc89ca62-5edb-4c8b-b129-1e75e3792ef5' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='b0519801-3d0b-4405-a10e-de73103e5913' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 o     ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID".   
 The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Detaljer: id='24006' name='ReportingProjectChangeMessageFailed'   
 uid='5a1493b2-e725-41e0-b315-42e76309b7a3' QueueMessageBody='Project UID='f12dced7-1d84-47e0-86ee-4049dbd9b1cd'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with   
 the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been   
 terminated.'.   
 •     Queue:   
 o     GeneralQueueJobFailed (26000) - ReportingProjectPublish.ReportProjectPublishMessageEx. Detaljer: id='26000' name='GeneralQueueJobFailed' uid='4c4a3d86-cdc6-485b-adde-289cb3c563f1'   
 JobUID='e575ba26-9256-417d-86d8-95280e4f66a4' ComputerName='XXX-XXXXX' GroupType='ReportingProjectPublish' MessageType='ReportProjectPublishMessageEx' MessageId='1' Stage=''.   
 Der er flere oplysninger i ULS-logfilerne på computeren XXX-XXXXXXX for poster med Job-UID e575ba26-9256-417d-86d8-95280e4f66a4.   

Solution

Log in to the adminstration area for the PWA with Project Server administrator permission.
 - 2013: Central Administration
 - 2010: PWA->PWA Settings
Go to
 - 2013: Central Administration->General Application Settings->PWA Settings->Manage
 - 2010: PWA settings (Server settings in 2010).
Go to Administrative Backup.
Backup all the custom fields.
Go to Administrative Restore.

Restore all the custom fields.
As everything in the reporting database someway has a custom field connected this will cause the whole database to get rebuilded.
Follow the restore in the queue.


torsdag den 7. august 2014

ProjectCheckinNotifyWorkflowMessage - Project Server

While developing a new program in Project Server CSOM today I got a strange error message in the queue:

 GeneralQueueJobFailed (26000) - WorkflowCheckinNotify.ProjectCheckinNotifyWorkflowMessage.   
 Details: id='26000' name='GeneralQueueJobFailed' uid='c71ab4e8-161e-e411-94b6-00155d006e04'   
 JobUID='c41ab4e8-161e-e411-94b6-00155d006e04'   
 ComputerName='20cd9b2e-c115-41ab-b138-70be4280f816'   
 GroupType='WorkflowCheckinNotify'   
 MessageType='ProjectCheckinNotifyWorkflowMessage' MessageId='1' Stage=''   
 CorrelationUID='4620ac9c-98d6-207f-0f81-68c3227e07e2'.   
 For more details, check the ULS logs on machine 20cd9b2e-c115-41ab-b138-70be4280f816 for entries with JobUID c41ab4e8-161e-e411-94b6-00155d006e04.   

The program was trying to insert a new task in a project. Inserting the task manually through the PWA also causes the error. There is no workflow on my EPT which makes the error message much more confusing.
The ULS logs didn't provide any other information.

Reason

The reason for the error is strait forward. I had not configured outgoing e-mail settings and when Project Server tried to send an email on workflow check-in it causes the error.

Solution

Disable notifications under Manage My Alerts in the PWA
or
Configure outgoing e-mail settings in SharePoint-Central Administration.


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