none
Is there a way to make an Attachment required in a Work Item for TFS 2010-

    Question

  • One of our development teams wants to make an attachment be required if a work item field is set to a specific value.  

    Is there a way to do this in TFS 2010?

    Thursday, January 10, 2013 3:39 PM

Answers

  • Hi John,

    Thanks for your post!

    In addition to what Jesse's said, you can use the the work item field rule to implement it.

    In the following example, when the RequirementLink field is set to "Yes", it requires to add a attachment to the work item.

    <FieldDefinition name="RequirementLink" refname="Demo.Requirement" type="String" reportable="dimension">
      <ALLOWEDVALUES>
        <LISTITEM value="Yes" />
        <LISTITEM value="No" />
      </ALLOWEDVALUES>
      <WHEN field="System.AttachedFileCount" value="0">
        <COPY from="value" value="Yes" />
        <PROHIBITEDVALUES>
          <LISTITEM value="Yes" />
        </PROHIBITEDVALUES>
      </WHEN>
      <WHENNOT field="System.AttachedFileCount" value="0">
        <COPY from="value" value="No" />
      </WHENNOT>
    </FieldDefinition>

    Hope it helps!

    Best Regards,


    Cathy Kong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 11, 2013 8:07 AM
    Moderator

All replies

  • You'll need to build a custom work item control to validate that.

    My blog: blog.jessehouwing.nl

    Thursday, January 10, 2013 10:57 PM
  • Hi John,

    Thanks for your post!

    In addition to what Jesse's said, you can use the the work item field rule to implement it.

    In the following example, when the RequirementLink field is set to "Yes", it requires to add a attachment to the work item.

    <FieldDefinition name="RequirementLink" refname="Demo.Requirement" type="String" reportable="dimension">
      <ALLOWEDVALUES>
        <LISTITEM value="Yes" />
        <LISTITEM value="No" />
      </ALLOWEDVALUES>
      <WHEN field="System.AttachedFileCount" value="0">
        <COPY from="value" value="Yes" />
        <PROHIBITEDVALUES>
          <LISTITEM value="Yes" />
        </PROHIBITEDVALUES>
      </WHEN>
      <WHENNOT field="System.AttachedFileCount" value="0">
        <COPY from="value" value="No" />
      </WHENNOT>
    </FieldDefinition>

    Hope it helps!

    Best Regards,


    Cathy Kong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 11, 2013 8:07 AM
    Moderator
  • Thanks!  I will give this a shot.
    Thursday, January 17, 2013 5:31 PM