locked
READONLY - doesn't display value? RRS feed

  • Question

  •  

    I'm customizing a workflow transition, where I'm defining the default value and I'd like it to be ReadOnly.  For example:  when a bug is first created, always assign to "*Dispatch - Dev" and don't let the user update.  I don't see the value once I add the readonly attribute.  That's not the intent of ReadOnly, is it?  Here's the partial xml:

     

    <TRANSITION from="" to="Active">

    <REASONS>

    <REASON value="Build Failure" />

    <DEFAULTREASON value="New" />

    </REASONS>

    <FIELDS>

    <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">

    <COPY from="currentuser" />

    <VALIDUSER />

    <REQUIRED />

    </FIELD>

    <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">

    <SERVERDEFAULT from="clock" />

    </FIELD>

    <FIELD refname="System.AssignedTo">

    <DEFAULT from="value" value="*Dispatch - Dev" />

    <READONLY />

    </FIELD>

    <FIELD refname="Microsoft.VSTS.Common.Priority">

    <DEFAULT from="value" value="99" />

    </FIELD>

    </FIELDS>

    </TRANSITION>

    Friday, June 1, 2007 5:57 PM

Answers

  • You may use this example as a workaround, it accomplish the task what you set out to do, though it doesn't use <Readonly>.

     

    <FIELD refname="System.AssignedTo">

        <ALLOWEDVALUES expanditems="true">

            <LISTITEM value="*Dispatch - Dev" />

        </ALLOWEDVALUES>

        <DEFAULT from="value" value="*Dispatch - Dev" />

    </FIELD>

     

    Hope this helps,

    Vic

    Friday, June 1, 2007 9:55 PM

All replies

  • You may use this example as a workaround, it accomplish the task what you set out to do, though it doesn't use <Readonly>.

     

    <FIELD refname="System.AssignedTo">

        <ALLOWEDVALUES expanditems="true">

            <LISTITEM value="*Dispatch - Dev" />

        </ALLOWEDVALUES>

        <DEFAULT from="value" value="*Dispatch - Dev" />

    </FIELD>

     

    Hope this helps,

    Vic

    Friday, June 1, 2007 9:55 PM
  • Note:  I believe that this will only work if "Dispatch - Dev" is in your list of ALLOWEDVALUES defined in your System.AssignedTo field rule definition.

     

    Thanks,

    Friday, June 1, 2007 10:58 PM