2

I am trying to import TFS items to a MS Project file. It works perfectly for almost all use cases except the case when "Duration" field is empty or less than 1. So, as a result I cannot import not estimated items. However when I import items with duration > 0, I can set them to 0 in MS project and push back to TFS. Any ideas how to solve the issue with importing items where duration = 0?

Here is the error message:

enter image description here

And here is mapping:

enter image description here

And here is the trace output for MS project:

[Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] --> ConvertRegularQueryResult()
[Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] resultsElement: <QueryIds xmlns=""></QueryIds>
[Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] <-- ConvertRegularQueryResult()
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:11.176, 59907 ms, General] >>> Query 0
WINPROJ.EXE Error: 0 : [Error, PID 7160, TID 5012, 2012/12/26 18:17:11.306, 60037 ms, General] 
{
Exception:  {
Exception Message: The argument value is not valid. (type COMException)
Exception Stack Trace:    at Microsoft.Office.Interop.MSProject.Task.SetField(PjField FieldID, String Value)
   at Microsoft.TeamFoundation.OfficeIntegration.Client.ProjectWorkItem.set_Item(String fieldReferenceName, Object value)
 }
}
WINPROJ.EXE Error: 0 : [Error, PID 7160, TID 5012, 2012/12/26 18:17:11.341, 60072 ms, General] 
{
Exception:  {
Exception Message: TF400481: One or more imported work items are not refreshing correctly because they contain field values that Microsoft Project does not allow. The first failing item, work item ID 118301 corresponding to Project task ID 1, contains an invalid value in field 'NSight.Workstation.TS.Fields.EstimatedManDays'. To make sure that all project plan data refreshes correctly, update the work item field values in Team Foundation Server and then refresh your project plan. (type OfficeDisplayableException)
Exception Stack Trace: 

Inner Exception Details:

Exception Message: The argument value is not valid. (type COMException)
Exception Stack Trace:    at Microsoft.Office.Interop.MSProject.Task.SetField(PjField FieldID, String Value)
   at Microsoft.TeamFoundation.OfficeIntegration.Client.ProjectWorkItem.set_Item(String fieldReferenceName, Object value)
   at Microsoft.TeamFoundation.OfficeIntegration.Client.ProjectWorkItemDictionary.UpdateFrom(WorkItemDictionaryBase currituckWorkItemDictionary, Boolean setCalculations, Boolean updateWorkItems)
 }
}
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:11.344, 60075 ms, General] <<< Page 1 items, 2 columns, 0 longtext
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.139, 60870 ms, General] >>> Page
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.139, 60870 ms, General] <<< Page 1 items, 2 columns, 0 longtext
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.945, 61675 ms, General] >>> Page
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.945, 61675 ms, General] <<< Page 1 items, 2 columns, 0 longtext
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:13.751, 62481 ms, General] >>> Page
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:13.752, 62482 ms, General] <<< Page 1 items, 2 columns, 0 longtext
WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:14.704, 63434 ms, General] >>> Page
WINPROJ.EXE Warning: 0 : [Warning, PID 7160, TID 5012, 2012/12/26 18:21:18.229, 306960 ms, General] UIHost.ShowMessageBox: result=OK caption='Microsoft Office Project' text='TF400481: One or more imported work items are not refreshing correctly because they contain field values that Microsoft Project does not allow. The first failing item, work item ID 118301 corresponding to Project task ID 1, contains an invalid value in field 'NSight.Workstation.TS.Fields.EstimatedManDays'. To make sure that all project plan data refreshes correctly, update the work item field values in Team Foundation Server and then refresh your project plan.'

TFS field definition:

<FIELD name="Est Man Days" refname="NSight.Workstation.TS.Fields.EstimatedManDays" type="Double" reportable="measure" formula="sum">
    <HELPTEXT>The estimated Man Days to complete task.</HELPTEXT>
</FIELD>
4

0 回答 0