locked
Readonly condition on work item field acts different in Web Access than Visual Studio RRS feed

  • Question

  • Hello,

    I am using TFS 2013 Update 3, then have VS 2013 Update 3, and been working in Chrome v43 and IE11. I customized one of my work item fields as follows:

    <FieldDefinition name="Blocked" refname="Microsoft.VSTS.CMMI.Blocked" type="String" reportable="dimension">
      <ALLOWEDVALUES expanditems="true">
        <LISTITEM value="Yes" />
        <LISTITEM value="No" />
      </ALLOWEDVALUES>
      <WHENCHANGED field="System.RelatedLinkCount">
        <READONLY />
      </WHENCHANGED>
    </FieldDefinition>
     

    So basically on the Blocked field, when someone adds any kind of work item link, i want Blocked to become readonly. This works just fine in VS2013. However when I try in web access, the Blocked field is still editable, but when I change the value, I get the error "The value for field 'Blocked' must be the same as the original value." Then if I try to change the value back to the original value, that error message remains. I can't get rid of it unless I refresh the whole work item and lose all my changes.

    I don't get why Web Access would render the <Readonly> rule differently than Visual Studio/team explorer. I can set fields <readonly> with no other conditions just fine. But as soon as I add a <when> or <whenchanged> clause with <Readonly>, it allows the field to be changed but gives the above warning message.

    I've tried using <frozen> instead, and that actually does get the job done except in scenarios where the field is blank/empty to start. So I'd really like to get readonly working in web access.

    Thank you,
    Patrick


    Wednesday, June 10, 2015 7:47 PM

Answers

All replies