In the TFS Workitemtracking Web service, you can call the Update method and set an attribute called BypassRules to true. That bypasses most of the rules for the Workitemtype in the Project. It is meant to be used to migrate data into the Server from other sources, where the data being passed in may not match the rules currently in existence on the server. A few things to note about this:

  1. The BypassRules functionality is not exposed via the TFS Workitemtracking Object Model. It can only be used by calling the Web Service directly or via the Proxy and passing up your own Update XML package to the Update method.
  2. Only members of the Service Accounts group are allowed to make calls with this flag set. (Otherwise all the WI rules would be meaningless if anyone could choose to bypass rules whenever they wanted.)
  3. Though most rules realted to Workitems are not verified by the Server when this flag is passed in, a few rules still get verified because they are related to the structural integrity of the WI data. These rules are:
    1. The WorkitemType field needs to have a valid value (a valid value would be a WIT name which is defined for the Project).
    2. The Rev of the WI being updated needs to be the one currently on the server. (You cannot repeat Revisions or create gaps in them)
    3. The State field cannot be empty.
    4. The "Changed Date" value cannot be empty. This is set by the server, the XML package should just mark it as such.
    5. The AreaId field should not be empty
    6. The IterationID field should not be empty
    7. The AreaID field should not be a deleted node.
    8. The IterationID field should not be a deleted node.
    9. The Created Date field should not be empty.
    10. The Created By field should not be empty.

A sample package is pasted below. Say the Bug workitemtype in a Project allows new Bugs to be created only with State = Active. The Bypass rules package below, when run by a member of the Service Accounts group, will ignore that rule.

<Package>
    <InsertWorkItem ObjectType='WorkItem' BypassRules='1'>
        <Columns>
            <Column Column='System.AreaID' Type='Number'><Value>5</Value></Column>
            <Column Column='System.IterationID' Type='Number'><Value>10</Value></Column>
            <Column Column='System.WorkItemType' Type='String'><Value>bug</Value></Column>
            <Column Column='System.Title' Type='String'><Value>New bug</Value></Column>
            <Column Column='System.State' Type='String'><Value>Closed</Value></Column>
            <Column Column='System.Reason' Type='String'><Value>New</Value></Column>
            <Column Column='System.CreatedDate' Type='ServerDateTime'></Column>
            <Column Column='System.CreatedBy' Type='String'><Value>John Doe</Value></Column>
            <Column Column='System.ChangedBy' Type='String'><Value>John Doe</Value></Column>           
        </Columns>
    </InsertWorkItem>
</Package>