<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I blog, you blog, they blog</title><link>http://blogs.msdn.com/abaturytski/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Memory usage in team system web application</title><link>http://blogs.msdn.com/abaturytski/archive/2009/04/10/memory-usage-in-team-system-web-application.aspx</link><pubDate>Sat, 11 Apr 2009 01:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9544235</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/9544235.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=9544235</wfw:commentRss><description>&lt;P&gt;Some important information for the &lt;A href="http://blogs.msdn.com/controlpanel/blogs/Some%20important%20information%20for%20the%20Team%20System%20Web%20Access" mce_href="http://blogs.msdn.com/controlpanel/blogs/Some important information for the Team System Web Access "&gt;Team System Web Access&lt;/A&gt; administrators. If your TSWA account does not have full permissions to the HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\WorkItemTracking\Cache registry path, you may be wasting a lot of resources. The work item store object stores the cache stamp there which is used on subsequent connect to determine what metadata should be obtained from the server and cached locally. If that key is missing, connecting to the server will pull its entire metadata. &lt;/P&gt;
&lt;P&gt;That's right. Every time a new user connects to the server using web access, TSWA downloads the entire metadata (tens or even hundreds of megabytes) just to throw them away. &lt;/P&gt;
&lt;P&gt;To fix that you should grant TSWA account full permissions to the abovementioned registry path. &lt;/P&gt;
&lt;P&gt;This issue appears in VSTS 2008 and 2008 SP1. We're working on a fix for that issue in dev10; we're planning to change storage mechanism so that saving the cache stamp will work with the default TSWA permissions.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9544235" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+tracking/default.aspx">work item tracking</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TSWA/default.aspx">TSWA</category></item><item><title>Metadata Synchronization by the Migration Toolkit</title><link>http://blogs.msdn.com/abaturytski/archive/2007/08/29/metadata-synchronization-by-the-migration-toolkit.aspx</link><pubDate>Thu, 30 Aug 2007 01:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4635019</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/4635019.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=4635019</wfw:commentRss><description>&lt;P&gt;There was some confusion regarding how the migration toolkit synchronizes work item tracking metadata between two systems, so I have decided to explain it a little bit.&lt;/P&gt;
&lt;P&gt;During every synchronization pass the toolkit calls non-TFS work item store's SynchronizeMetadata method passing reference to a work item tracking project used by the TFS system. Implementing that method is up to tool's authors; the toolkit itself doesn't make any assumptions about what metadata it synchronizes and in which direction such synchronization occurs.&lt;/P&gt;
&lt;P&gt;In case when TFS system is used on both sides, we implement metadata synchronization by copying metadata from the system defined as TFS from the config file, and applying it to the "Source" system. The synchronization is controlled by an optional MetadataSynchronization element under the source-specific TFS node:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;Session id=”test”&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;Tfs server=”Foo”&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;/Tfs&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;Source&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Tfs server=”Bar”&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MetadataSynchronization types=”all”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Tfs&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;/Source&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;/Session&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Here's what you can control:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Specifying what metadata must be synchronized:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;MetadataSynchronization types=”accounts lists types all”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;“types” attribute specifies what metadata types will be synchronized. “all” is the default value; specifying an empty string disables metadata synchronization&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Skipping synchronization of certain work item types:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;MetadataSynchronization&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;IgnoredTypes&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name value=”Bug”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Name value=”Orcas Bug”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;/IgnoredTypes&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;/MetadataSynchronization&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Work items referenced within the IgnoredTypes section will not be synchronized. Unfortunately this feature does not work with work item type mapping.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Skipping synchronization of certain global lists:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;MetadataSynchronization&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;IgnoredLists&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name value=”GlobalList1”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name value=”GlobalList2”/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp; &amp;lt;/IgnoredLists&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;&amp;lt;/MetadataSynchronization&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Global lists referenced within the IgnoredLists section will not be synchronized.&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4635019" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/Migration+Toolkit/default.aspx">Migration Toolkit</category></item><item><title>Team System MSDN Chat</title><link>http://blogs.msdn.com/abaturytski/archive/2007/07/24/team-system-msdn-chat.aspx</link><pubDate>Tue, 24 Jul 2007 20:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4031924</guid><dc:creator>abaturytski</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/4031924.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=4031924</wfw:commentRss><description>&lt;P&gt;Another MSDN chat is coming on 8/1/07. We will be holding two sessions: 10:00 AM - 11:00 AM and 4:00 PM - 5:00 PM. Times are in PST.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4031924" width="1" height="1"&gt;</description></item><item><title>TF26201 and How to Deal With It</title><link>http://blogs.msdn.com/abaturytski/archive/2007/07/13/tf26201-and-how-to-deal-with-it.aspx</link><pubDate>Fri, 13 Jul 2007 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3850858</guid><dc:creator>abaturytski</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3850858.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3850858</wfw:commentRss><description>&lt;P&gt;If you customize work item type definitions in TFS, you may have already encountered this error. Witimport works fine and imports your type with no errors; however, saving your work item gives you the following error: "TF26201: This work item has unsupported fields, or user does not have permissions." Go figure... If you do have permissions for saving that work item, you have just encountered a bug in the rules engine.&lt;/P&gt;
&lt;P&gt;Before I explain how to take care of the issue, let me explain briefly the process of rules evaluation in TFS. Rules get evaluated when a new revision is created (all fields), after field's value was changed by user (affected fields only), and before the work item is saved (all fields). Evaluation occurs in two steps (it's a little bit more complicated, but this is enough to explain the issue):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Processing copy &amp;amp; default rules;&lt;/LI&gt;
&lt;LI&gt;Processing all remaining rules.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Internally the system stores all rules in a form of a flat list; each rule record includes the rule itself, a field it applies to, and a condition defining when the rule applies.&amp;nbsp;Evaluation of rules occurs according to the following algorithm:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Get the next rule.&lt;/LI&gt;
&lt;LI&gt;Apply the rule if its condition is satisfied&lt;/LI&gt;
&lt;LI&gt;Go to step 1.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Normally the list includes all rules defined in the work item type, but after a single field change it is included to rules defined for that field and all dependencies. Now consider a work item type with the following field definitions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;FIELD refname="Sample.Field.1" name="Sample Field 1" type="String"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;COPY from="value" value="Value 1"/&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/FIELD&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;FIELD refname="Sample.Field.2" name="Sample Field 2" type="String"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WHEN field="Sample.Field.1" value="Value 1"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;COPY from="value" value="Value 2"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/WHEN&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/FIELD&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;FIELD refname="Sample.Field.3" name="Sample Field 3" type="String"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WHEN field="Sample.Field.2" value="Value 2"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;REQUIRED/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/WHEN&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/FIELD&amp;gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Whether the COPY rule for Field 2 will be executed during the phase 1 after creating a new work item depends on the order in which copy rules will be processed, and that order is not deterministic (although it always stays the same for a single team foundation server). If COPY rule for Field 1 evaluates first, it modifies Field 1, and condition on Field 2 evaluates to true causing its COPY rule to be executed. However, condition on Field 2 does not evaluate to true if Field 2's COPY rule was obtained first (because Field 1 had not been modified); Field 3 will not appear required. Saving the work item will trigger another round of rules evaluation, which will set Field 2 to Value 2 and will implicitly make Field 3 invalid. Saving the work item fails, and you are getting the ugly TF26201 message.&lt;/P&gt;
&lt;P&gt;At this time we do not have a reliable solution for this problem. Here are some tips to ease the pain:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;After saving a work item failed with this message, you may be able to identify the field causing that failure by analyzing each field's IsValid property.&lt;/LI&gt;
&lt;LI&gt;Avoid "chaining" conditions to results of applying a COPY/DEFAULT rule if that rule is located within a condition.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3850858" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+tracking/default.aspx">work item tracking</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+type+definition/default.aspx">work item type definition</category></item><item><title>Using EMPTY rule in work item type definition.</title><link>http://blogs.msdn.com/abaturytski/archive/2007/06/20/using-empty-rule-in-work-item-type-definition.aspx</link><pubDate>Wed, 20 Jun 2007 02:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3414269</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3414269.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3414269</wfw:commentRss><description>&lt;P&gt;It turned out that &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/aa337595(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa337595(VS.80).aspx"&gt;the article about EMPTY rule in work item type definition XML&lt;/A&gt; is incomplete. It doesn't say one very important thing: EMPTY rule not only clears content of the field, but also makes the field read only. If your work item type uses a combination of both EMPTY and READONLY elemnts, consider removing the redundant read only rule.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3414269" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+tracking/default.aspx">work item tracking</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+type+definition/default.aspx">work item type definition</category></item><item><title>Migration Toolkit Tips and Tricks</title><link>http://blogs.msdn.com/abaturytski/archive/2007/06/15/migration-toolkit-tips-and-tricks.aspx</link><pubDate>Fri, 15 Jun 2007 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3317564</guid><dc:creator>abaturytski</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3317564.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3317564</wfw:commentRss><description>&lt;P&gt;Here's probably the most important thing everyone should know before using the &lt;A class="" title=MigrationToolkitLink href="http://www.codeplex.com/MigrationSyncToolkit" mce_href="http://www.codeplex.com/MigrationSyncToolkit"&gt;migration toolkit&lt;/A&gt;: you must add accout the toolkit will be running under into the TFS Service Accounts group. Here's the command for doing that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;tfssecurity.exe /server:http://yourserver:8080 /g+ srv: domain\account&lt;/P&gt;
&lt;P&gt;Work items synchronization disables validation of rules when updating the TFS side, and this works only for members of the Service Accounts group. We're trying to recreate history of changes from the opposite side, and validating these changes against the most recent work item type definition is not the best thing to do here.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3317564" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/Migration+Toolkit/default.aspx">Migration Toolkit</category></item><item><title>Effective TFS programming: editing work items</title><link>http://blogs.msdn.com/abaturytski/archive/2007/06/11/effective-tfs-programming-editing-work-items.aspx</link><pubDate>Tue, 12 Jun 2007 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3237611</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3237611.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3237611</wfw:commentRss><description>&lt;P&gt;There's not much optimization you can do when saving work items. But when your application updates multiple work items, consider submitting results in a single batch using &lt;A class="" title=WorkItemStore.BatchSave href="http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitemstore.batchsave(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitemstore.batchsave(VS.80).aspx"&gt;WorkItemStore.BatchSave&lt;/A&gt; method. Here are some important notes about this method:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Everything is submitted in a single backend call. This is more efficient then calling &lt;A class="" title=WorkItem.Save href="http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitem.save(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitem.save(VS.80).aspx"&gt;WorkItem.Save&lt;/A&gt; for each updated item.&lt;/LI&gt;
&lt;LI&gt;Everything is submitted in a single transaction. If the method fails, neither work item gets updated.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3237611" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+tracking/default.aspx">work item tracking</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category></item><item><title>Effective TFS programming: querying</title><link>http://blogs.msdn.com/abaturytski/archive/2007/06/11/effective-queries-in-tfs.aspx</link><pubDate>Mon, 11 Jun 2007 23:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3235306</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3235306.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3235306</wfw:commentRss><description>&lt;P&gt;Querying in TFS is easy. You run a query specifying a filter; you walk through returned items performing certain actions on each returned item. Now after a few runs you start asking yourself: why is it so slow? Here are some non-obvious implementation details that should answer this question.&lt;/P&gt;
&lt;P&gt;A work item returned by a query only has fields specified in the SELECT clause. Accessing a field not from that list results in a roundtrip to the server to obtain that field for this work item (and for 49 other items from that query; we batch reading operations). If your query asks for System.Id, but also obtain Title, Assigned To and other fields, the object model makes a lot of unnecessary database calls behind the scene.&lt;/P&gt;
&lt;P&gt;Accessing collection of links, file attachments, or historical revisions opens the work item. Opening obtains all work item's data in a single roundtrip to&amp;nbsp;the server. It loads ALL fields in ALL revisions; file attachments and links. At the same time accessing fields like Rev, RelatedLinkCount, HyperlinkCount, AttachedFileCount, and ExternalLinkCount does not require opening the item, so it is better to use these fields to check item's number of revisions or file attachments.&lt;/P&gt;
&lt;P&gt;Calling &lt;STRONG&gt;WorkItemStore.GetWorkItem&lt;/STRONG&gt; returns you an opened work item with all data. If your program queries work items to access their historical revisions, file attachments, or links, it is better to create a query returning only System.Id field, and call WorkItemStore.GetWorkItem for each returned work item.&lt;/P&gt;
&lt;P&gt;Here's the summary:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Always specify fields you're going to work with in the SELECT clause of the query;&lt;/LI&gt;
&lt;LI&gt;Use System.Rev and Count fields to check the number of revisions/file attachments/links instead of using corresponding collections;&lt;/LI&gt;
&lt;LI&gt;Accessing links/attachments/revisions opens the work item loading all its data. Consider calling WorkItemStore.GetWorkItem for a work item right after it was returned from the query if you need this data. &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3235306" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/abaturytski/archive/tags/work+item+tracking/default.aspx">work item tracking</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/query/default.aspx">query</category><category domain="http://blogs.msdn.com/abaturytski/archive/tags/TFS/default.aspx">TFS</category></item><item><title>Introduction</title><link>http://blogs.msdn.com/abaturytski/archive/2007/06/05/introduction.aspx</link><pubDate>Tue, 05 Jun 2007 21:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3103188</guid><dc:creator>abaturytski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/abaturytski/comments/3103188.aspx</comments><wfw:commentRss>http://blogs.msdn.com/abaturytski/commentrss.aspx?PostID=3103188</wfw:commentRss><description>&lt;P&gt;A few words about me and about this blog. I am a developer at Microsoft; have been working here since 2000. I am a member of the Team Foundation Server team (client side of the work item tracking). I have been involved in development of things like work item type definition XML; rules engine, provisioning (import/export) of work item types/global lists, migration toolkit.&lt;/P&gt;
&lt;P&gt;Here I am going to uncover certain secrets of effective usage of work item tracking in TFS. The plan for the nearest future is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Effective querying and accessing work items;&lt;/LI&gt;
&lt;LI&gt;Configuring work items synchronization with the migration toolkit.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Stay tuned!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3103188" width="1" height="1"&gt;</description></item></channel></rss>