关于ProjectServer调用PSI 报Error GeneralReadOnlyColumn (20005) - column TS_ACT_FINISH_DATE错的解决方案

TimesheetDataSet

Table Actuals

Row: TS_LINE_UID='f4b970f8-fb03-44d1-9997-cd31da42cb09' TS_ACT_START_DATE='07/29/2014 00:00:00'

Error GeneralReadOnlyColumn (20005) - column TS_ACT_FINISH_DATE

 

常规

Queue:

GeneralQueueJobFailed (26000) - TimesheetUpdate.UpdateTimesheetMessage. 详细信息: id='26000' name='GeneralQueueJobFailed' uid='47fe2fdc-0ab6-4dfc-989e-767b242adc04' JobUID='b97052fe-4ddb-4ebd-a0ef-c49cbd833a31' ComputerName='WIN-FK1G0HEBTD3' GroupType='TimesheetUpdate' MessageType='UpdateTimesheetMessage' MessageId='1' Stage=''. 有关详细信息,请查阅机器 WIN-FK1G0HEBTD3 上的 ULS 日志中带有 JobUID b97052fe-4ddb-4ebd-a0ef-c49cbd833a31 的条目.

 

原因如下:

if (actualsRow == null)

                                {

                                    //WriteLog.recordLog("进?入¨?时º¡À间?表À¨ª汇?报À¡§页°3面?4");

                                    TimesheetDataSet.ActualsRow newRow = timesheetDataSet.Actuals.NewActualsRow();

                                    if (newRow != null)

                                    {

                                        newRow.TS_LINE_UID = TSLineId;

                                        newRow.TS_ACT_START_DATE = StartDate;

                                       

                                        newRow.TS_ACT_FINISH_DATE = StartDate.AddDays(1).AddMilliseconds(-1);

                                        newRow.TS_ACT_VALUE = Convert.ToDecimal(workDay.ActualWork * 60000);

                                        //newRow.TS_ACT_COMMENT = item.Comment;

                                        timesheetDataSet.Actuals.AddActualsRow(newRow);

 

                                        //TimesheetDataSet.ActualsRow actualsRow1 = timesheetDataSet.Actuals.FindByTS_LINE_UIDTS_ACT_START_DATE(TSLineId, StartDate);

                                        //actualsRow1.TS_ACT_VALUE = Convert.ToDecimal(workDay.ActualWork * 60000);

 

                                    }

 

                                }

就是因为这句话newRow.TS_ACT_FINISH_DATE = StartDate.AddDays(1).AddMilliseconds(-1);

按道理,如果员工没有特别设置,管理计划任务的计划完成时间是每天的18点,而你更改为23:59:59,这样就会涉及到修改实际完成时间的操作,而管理类任务实际完成时间是不能修改的,最终导致队列堵死报错。

 

找到原因后就好解决了:

newRow.TS_ACT_START_DATE = StartDate.AddHours(8);

                                       

newRow.TS_ACT_FINISH_DATE = StartDate.AddHours(17);

最好的是取管理类任务的计划开始时间和计划完成时间。

 

参考文献有:

http://www.msprojectnow.com/Blog/tabid/142/entryid/254/Default.aspx

http://social.technet.microsoft.com/Forums/projectserver/en-US/ac9c2f0a-633d-48bd-ba33-12e0ee515fa5/pwa-2010-timesheet-update-or-submit-error?forum=projectserver2010general

http://social.technet.microsoft.com/Forums/projectserver/en-US/d81c0661-88fe-4a74-a1f4-359e4243e5d9/pwa-2010-timesheet-error?forum=projectserver2010general

http://social.microsoft.com/Forums/ru-RU/f77ebc8b-6567-4ce2-ac6f-5848a584ca31/ps-2010-timesheet-error-on-save-error-generalreadonlycolumn-20005-column-tsactfinishdate?forum=projserv2010setup

 

你可能感兴趣的:(readOnly)