In TFS 2012 I have edited the Task Work Item so that it automatically copies the original estimate over to the remaining estimate field when the original estimate is changed.
My Code:
<FieldDefinition name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure">
<WHENCHANGED field="Microsoft.VSTS.Scheduling.OriginalEstimate">
<COPY from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHENCHANGED>
<HELPTEXT>An estimate of the number of units of work remaining to complete this task</HELPTEXT>
</FieldDefinition>
However when you enter a value in the original estimate field for a task and hit save, it copies across the previous value and not the current.
How do I fix it so that it copies the new value across upon saving the task and not the previous saved value?
Edit: This is the xml pulled from the entire file view rather than TFS power tools view of just that item. It for some reason showed <fieldDefinition>
instead of <field>
:
<FIELD name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure">
<WHENCHANGED field="Microsoft.VSTS.Scheduling.OriginalEstimate">
<COPY from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHENCHANGED>
<HELPTEXT>An estimate of the number of units of work remaining to complete this task</HELPTEXT>
</FIELD>