title: MS Project 2013 and TFS 2010 integration
body: <p>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 <strong>1</strong>. 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?</p>
  
  <p>Here is the error message:</p>
  
  <p><img src="https://i.stack.imgur.com/rrjJk.png" alt="enter image description here"></p>
  
  <p>And here is mapping:</p>
  
  <p><img src="https://i.stack.imgur.com/ubwLW.png" alt="enter image description here"></p>
  
  <p>And here is the trace output for MS project:</p>
  
  <pre><code>[Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] --&gt; ConvertRegularQueryResult()
  [Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] resultsElement: &lt;QueryIds xmlns=""&gt;&lt;/QueryIds&gt;
  [Verbose, PID 7160, TID 5012, 2012/12/26 18:17:11.175, 59906 ms, General] &lt;-- ConvertRegularQueryResult()
  WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:11.176, 59907 ms, General] &gt;&gt;&gt; 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] &lt;&lt;&lt; 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] &gt;&gt;&gt; Page
  WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.139, 60870 ms, General] &lt;&lt;&lt; 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] &gt;&gt;&gt; Page
  WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:12.945, 61675 ms, General] &lt;&lt;&lt; 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] &gt;&gt;&gt; Page
  WINPROJ.EXE Information: 0 : [Info, PID 7160, TID 5012, 2012/12/26 18:17:13.752, 62482 ms, General] &lt;&lt;&lt; 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] &gt;&gt;&gt; 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.'
  </code></pre>
  
  <p>TFS field definition:</p>
  
  <pre><code>&lt;FIELD name="Est Man Days" refname="NSight.Workstation.TS.Fields.EstimatedManDays" type="Double" reportable="measure" formula="sum"&gt;
      &lt;HELPTEXT&gt;The estimated Man Days to complete task.&lt;/HELPTEXT&gt;
  &lt;/FIELD&gt;
  </code></pre>