Bug in WebPage Control on TFS Process Editor


 When building process guidance in Team Foundation Server 2010, I like to put a WebPageControl on a tab that can respond contextually to the work item or even the state that the work item is in.  TFS gives you a really great way to present this, but there is a catch.Below, is the XML from the work item definition that will look to the SharePoint 2010 portal and open an HTML document tied to that Work Item in the Process Guidance document library.  While you might want to keep this flat, I have some additional folder structure there to give me flexibility as I choose to redirect on additional values in the future.  The important part of this is the @PortalPage server variable.  This tells the server to look up the SharePoint site for this project and build this into the URL.

<Control Type=WebpageControl LabelPosition=Top Dock=Fill>
   <WebpageControlOptions AllowScript=false ReloadOnParamChange=false>
      <Link UrlRoot=@portalpage UrlPath=Process%20Guidance/Supporting%20Files/{0}/index.html>
         <Param Index=0 Value=System.WorkItemType Type=Current />
      </Link>
   </WebpageControlOptions>
</Control>
 

This is great and provides an intuitive experience for the users of the TFS template.  The problem comes when using the TFS Process Editor (from the TFS Power Tools) to graphically edit the work item.  Whenever you save the Work Item with the Process Editor, it reinterprets the @PortalPage variable breaking the link.

 <Control Type=WebpageControl LabelPosition=Top Dock=Fill>
   <WebpageControlOptions AllowScript=false ReloadOnParamChange=false>
      <Link UrlRoot=http://portalpage UrlPath=Process%20Guidance/Supporting%20Files/{0}/index.html>
         <Param Index=0 Value=System.WorkItemType Type=Current />
      </Link>
   </WebpageControlOptions>
</Control>

I hope this is something that gets fixed in a future version of the Process Editor, but for now, you must open the WIT file in an XML editor and adjust the value manually.  
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s