<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">AmitGh's WebLog</title><subtitle type="html" /><id>http://blogs.msdn.com/b/amitgh/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/amitgh/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/amitgh/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2006-08-17T16:40:00Z</updated><entry><title>Bypass Workitemtracking Workitem rules</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/amitgh/archive/2006/08/20/709737.aspx" /><id>http://blogs.msdn.com/b/amitgh/archive/2006/08/20/709737.aspx</id><published>2006-08-21T00:56:00Z</published><updated>2006-08-21T00:56:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In the TFS Workitemtracking&amp;nbsp;Web service, you can call the Update method and&amp;nbsp;set an attribute called BypassRules to true. That bypasses most of the rules for the&amp;nbsp;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:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The BypassRules functionality&amp;nbsp;is not exposed via the TFS Workitemtracking Object Model. It can only be used by calling the&amp;nbsp;Web Service directly or via the Proxy and passing up your own Update XML package to the Update method.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;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.)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;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:&lt;/FONT&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The WorkitemType field needs to have a valid value (a valid value would be a WIT name which is defined for the Project).&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;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)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The State field cannot be empty.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The "Changed Date" value cannot be empty. This is set by the server, the XML package should just mark it as such.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The AreaId field should not be empty&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The IterationID field should not be empty&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The AreaID field should not be a deleted node.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The IterationID field should not be a deleted node.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The Created Date field should not be empty.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The Created By field should not be empty.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;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.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;lt;Package&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;InsertWorkItem ObjectType='WorkItem' &lt;STRONG&gt;BypassRules='1'&lt;/STRONG&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Columns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.AreaID' Type='Number'&amp;gt;&amp;lt;Value&amp;gt;5&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.IterationID' Type='Number'&amp;gt;&amp;lt;Value&amp;gt;10&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.WorkItemType' Type='String'&amp;gt;&amp;lt;Value&amp;gt;bug&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.Title' Type='String'&amp;gt;&amp;lt;Value&amp;gt;New bug&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;Column Column='System.State' Type='String'&amp;gt;&amp;lt;Value&amp;gt;Closed&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.Reason' Type='String'&amp;gt;&amp;lt;Value&amp;gt;New&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.CreatedDate' Type='ServerDateTime'&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.CreatedBy' Type='String'&amp;gt;&amp;lt;Value&amp;gt;John Doe&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Column Column='System.ChangedBy' Type='String'&amp;gt;&amp;lt;Value&amp;gt;John Doe&amp;lt;/Value&amp;gt;&amp;lt;/Column&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/InsertWorkItem&amp;gt;&lt;BR&gt;&amp;lt;/Package&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=709737" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>About this blog...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/amitgh/archive/2006/08/17/704947.aspx" /><id>http://blogs.msdn.com/b/amitgh/archive/2006/08/17/704947.aspx</id><published>2006-08-18T02:40:00Z</published><updated>2006-08-18T02:40:00Z</updated><content type="html">My name is Amit Ghosh and I am a Dev Lead for the Workitemtracking Server component for Team Foundation Server. Planning to use this as a public forum for&amp;nbsp;information about the WIT in the TFS 1.0 release and plans for &amp;nbsp;WIT in future releases.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=704947" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author></entry></feed>