J
Joe Mitchel
Hi,
I'm trying to update task field 'Text5' and it's failing. I create
the new TaskCustomFieldRow and fill out the data but upon the call to
QueueAddToProject I get the below exception.
Here is my code to generate the Task data...
WebSvcProject.ProjectDataSet.TaskCustomFieldsRow CFRow =
CPData.TaskCustomFields.NewTaskCustomFieldsRow();
CFRow.PROJ_UID = ProjectUID;
CFRow.TASK_UID = TaskUID;
CFRow.CUSTOM_FIELD_UID = Guid.NewGuid();
CFRow.MD_PROP_UID =
PSLibrary.CustomField.LOCAL_CUSTOM_FIELD_MD_PROP_UID_TASK_TEXT5;
CFRow.MD_PROP_ID = PSLibrary.TaskProperties.Text5.WinProjId;
CFRow.FIELD_TYPE_ENUM = (byte)PSLibrary.CustomField.Type.TEXT;
CFRow.TEXT_VALUE = Value;
CPData.TaskCustomFields.AddTaskCustomFieldsRow(CFRow);
WebSvcProject.ProjectDataSet AddChanges =
(WebSvcProject.ProjectDataSet)CPData.GetChanges(System.Data.DataRowState.Added);
if (AddChanges != null)
{
JobID = Guid.NewGuid();
ProjectService.QueueAddToProject(JobID, SessionGuid,
AddChanges, false);
WaitForQueue(ProjectQueue, JobID);
}
Value in this case is a valid string. Anyone know why this is
happening. I can't for the life of me figure it out.
----------[ Exception ]------------------------------
System.ApplicationException: An Error Occurred while attempting to
update the queue: System.ApplicationException: <?xml version="1.0"
encoding="utf-16"?>
<errinfo>
<general>
<class name="GeneralQueueException">
<error id="9131" name="GeneralQueueException"
uid="df9fbb26-37e4-407f-a207-2597f1fd4e8e" messageID="2"
exception="Microsoft.Office.Project.Scheduling.SchedulingException:
The ITaskTable already contains this task.
at
Microsoft.Office.Project.Scheduling.TaskTable.Insert(ITask
task)
at
Microsoft.Office.Project.Server.BusinessLayer.SchedulingData.CreateNewRows()
at
Microsoft.Office.Project.Server.BusinessLayer.SchedulingData.LoadData(Boolean
isDelete)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.LoadSchedulingData(Boolean
isDelete, Int32 revisionCounter)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.HandleProject(ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock, Boolean
fCheckReadOnly, Boolean fCheckProtectedActuals, Boolean
fAllowAddEntRes)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.HandleProject(ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectQueueDispatch.HandleProject(MessageContext
mContext, ProjectMain project, ServerEventManager sem, ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectQueueDispatch.InternalDispatchMessage(PlatformContext
context, Message msg, Group messageGroup, JobTicket jobTicket,
MessageContext mContext)" />
</class>
<class name="Queue">
<error id="26000" name="GeneralQueueJobFailed"
uid="42864af9-2014-42f4-aab4-3cf973d590ea"
JobUID="bc3ba401-b461-4df1-810e-378213d91e9a"
ComputerName="DEVPROJECT" GroupType="ProjectUpdate" MessageType=""
MessageId="" Stage="" />
</class>
</general>
</errinfo>
at UPTSync.MainForm.WaitForQueue(QueueSystem ProjectQueue, Guid
JobID) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 678
at UPTSync.MainForm.UpdateProject(Guid ProjectUID, UPTDataContext
UPTData) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 583
at UPTSync.MainForm.UpdateProject(Guid ProjectUID, UPTDataContext
UPTData) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 620
I'm trying to update task field 'Text5' and it's failing. I create
the new TaskCustomFieldRow and fill out the data but upon the call to
QueueAddToProject I get the below exception.
Here is my code to generate the Task data...
WebSvcProject.ProjectDataSet.TaskCustomFieldsRow CFRow =
CPData.TaskCustomFields.NewTaskCustomFieldsRow();
CFRow.PROJ_UID = ProjectUID;
CFRow.TASK_UID = TaskUID;
CFRow.CUSTOM_FIELD_UID = Guid.NewGuid();
CFRow.MD_PROP_UID =
PSLibrary.CustomField.LOCAL_CUSTOM_FIELD_MD_PROP_UID_TASK_TEXT5;
CFRow.MD_PROP_ID = PSLibrary.TaskProperties.Text5.WinProjId;
CFRow.FIELD_TYPE_ENUM = (byte)PSLibrary.CustomField.Type.TEXT;
CFRow.TEXT_VALUE = Value;
CPData.TaskCustomFields.AddTaskCustomFieldsRow(CFRow);
WebSvcProject.ProjectDataSet AddChanges =
(WebSvcProject.ProjectDataSet)CPData.GetChanges(System.Data.DataRowState.Added);
if (AddChanges != null)
{
JobID = Guid.NewGuid();
ProjectService.QueueAddToProject(JobID, SessionGuid,
AddChanges, false);
WaitForQueue(ProjectQueue, JobID);
}
Value in this case is a valid string. Anyone know why this is
happening. I can't for the life of me figure it out.
----------[ Exception ]------------------------------
System.ApplicationException: An Error Occurred while attempting to
update the queue: System.ApplicationException: <?xml version="1.0"
encoding="utf-16"?>
<errinfo>
<general>
<class name="GeneralQueueException">
<error id="9131" name="GeneralQueueException"
uid="df9fbb26-37e4-407f-a207-2597f1fd4e8e" messageID="2"
exception="Microsoft.Office.Project.Scheduling.SchedulingException:
The ITaskTable already contains this task.
at
Microsoft.Office.Project.Scheduling.TaskTable.Insert(ITask
task)
at
Microsoft.Office.Project.Server.BusinessLayer.SchedulingData.CreateNewRows()
at
Microsoft.Office.Project.Server.BusinessLayer.SchedulingData.LoadData(Boolean
isDelete)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.LoadSchedulingData(Boolean
isDelete, Int32 revisionCounter)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.HandleProject(ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock, Boolean
fCheckReadOnly, Boolean fCheckProtectedActuals, Boolean
fAllowAddEntRes)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectMain.HandleProject(ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectQueueDispatch.HandleProject(MessageContext
mContext, ProjectMain project, ServerEventManager sem, ProjectDataSet
dataset, Guid projectUid, Guid userUid, String userName, Boolean
isNew, Boolean addColumns, ProjectLocks projectLock)
at
Microsoft.Office.Project.Server.BusinessLayer.ProjectQueueDispatch.InternalDispatchMessage(PlatformContext
context, Message msg, Group messageGroup, JobTicket jobTicket,
MessageContext mContext)" />
</class>
<class name="Queue">
<error id="26000" name="GeneralQueueJobFailed"
uid="42864af9-2014-42f4-aab4-3cf973d590ea"
JobUID="bc3ba401-b461-4df1-810e-378213d91e9a"
ComputerName="DEVPROJECT" GroupType="ProjectUpdate" MessageType=""
MessageId="" Stage="" />
</class>
</general>
</errinfo>
at UPTSync.MainForm.WaitForQueue(QueueSystem ProjectQueue, Guid
JobID) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 678
at UPTSync.MainForm.UpdateProject(Guid ProjectUID, UPTDataContext
UPTData) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 583
at UPTSync.MainForm.UpdateProject(Guid ProjectUID, UPTDataContext
UPTData) in D:\UnrealProjectTracker\Src\UPTSync\MainForm.cs:line 620