Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't edit newly added work item field

I am trying to add a new string field (IterationCompleted) to the bug work item in tfs2010. Using the TFS 2010 power tools I edited the work item adding the new field. This results in the following XML

<FieldDefinition reportable="dimension" refname="DevX.IterationCompleted" name="Iteration Completed" type="String">
  <ALLOWEDVALUES>
    <GLOBALLIST name="Iterations" />
  </ALLOWEDVALUES>
  <ALLOWEXISTINGVALUE />
  <DEFAULT from="value" value="∞" />
</FieldDefinition>

I added it to the form next to some related fields. Here is the relevant XML

<Group Label="Classification">
  <Column PercentWidth="100">
    <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area:" LabelPosition="Left" />
    <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Ite&amp;ration Found:" LabelPosition="Left" />
    <Control FieldName="DevX.IterationCompleted" Type="FieldControl" Label="Iteration Resolved:" LabelPosition="Left" Name="IterationCompleted" />
    <Control FieldName="DevX.Customer" Type="FieldControl" Label="Customer:" LabelPosition="Left" />
    <Control FieldName="DevX.ReleaseNotes" Type="FieldControl" Label="Include in Release Notes:" LabelPosition="Left" />
    <Control FieldName="DevX.Billable" Type="FieldControl" Label="Billable:" LabelPosition="Left" Name="Billable" />
  </Column>
</Group>

It is not involved in the workflow at all.

The problem I'm having is in the form. For new bugs, the field appears as expected and is editable (Iteration Resolved):

Field editable

For old bugs however, the field is not editable. In fact there is no control at all there to input anything:

Field not editable

I found a similar question with an accepted answer to make sure the field is String and that on the Form the type is set to FieldControl. As you can see I have done that and still get the results I am seeing above. I have successfully added fields in the past and never encountered this problem. Does anyone know what I can do to get this field editable in old bugs?

like image 869
Dustin Hodges Avatar asked Feb 03 '12 21:02

Dustin Hodges


People also ask

Can you change work item type in Azure DevOps?

You can add custom work item types and change the form layout. The Configure Features Wizard will update your projects and you'll get access to the latest features.

How do I edit fields in DevOps?

To modify the pick list of an inherited field, choose Edit to edit the field. On the Definition tab, you can choose to Add value. (Optional) Choose the Options tab to define the field as required, specify a default, or allow users to enter their own values.


1 Answers

I came across the same behaviour... Or at least similar...

I had to add default values for all the lists..

When I did not have a default value, any WIT's which had already been created could not have there values set, as it was not a ALLOWEDVAULES LISTITEM...

(Note: This code/XML changes the value of a list depending on the state of the WIT)

Sample:

<FIELD reportable="dimension" refname="GovDept.ActionRequiredTFS" name="Action Reqd TFS" type="String">
    <WHEN field="System.State" value="Proposed">
      <ALLOWEDVALUES>
        <LISTITEM value="Assess" />
        <LISTITEM value="Prioritize" />
      </ALLOWEDVALUES>
      <DEFAULT from="value" value="Assess" />
    </WHEN>
    <WHEN field="System.State" value="Active">
      <ALLOWEDVALUES>
        <LISTITEM value="IA Complete" />
        <LISTITEM value="Impact" />
        <LISTITEM value="Implement" />
        <LISTITEM value="Migrate" />
        <LISTITEM value="Unit Test" />
        <LISTITEM value="Fix Fail" />
      </ALLOWEDVALUES>
      <DEFAULT from="value" value="Impact" />
    </WHEN>
    <WHEN field="System.State" value="Resolved">
      <ALLOWEDVALUES>
        <LISTITEM value="Test" />
        <LISTITEM value="Fix Fail" />
      </ALLOWEDVALUES>
      <DEFAULT from="value" value="Test" />
    </WHEN>
    <ALLOWEXISTINGVALUE />
  </FIELD>

End of Sample

like image 95
Gordon Muscroft Avatar answered Sep 23 '22 00:09

Gordon Muscroft