TSWA tip: How to use the new TSWA template URL feature (initial value URL)


One of the new features we’ve added to TSWA for the SP1 release is the ability to create URLs that are effectively work item templates by virtue of the fact that they have the values for the work items embedded in the URL itself.


Since constructing these URLs manually is really painful, we have an icon on the work item editor when you are creating a new work item that creates the URL and places it in the Windows clipboard.


Bring up the new work item form, fill in whatever values you want to get automatically set each time you use the URL, and then click the “globe with chain link” icon below the Save button.


image


Then you’ll get a pop-up message like this letting you know the template URL is now in the clipboard.


image


When you paste the contents of the clipboard, you’ll get a link like this.


http://myserver:8090/UI/Pages/WorkItems/WorkItemEdit.aspx?pname=Orcas&wit=Orcas%20Bug&[System.Title]=Bug%20Bash%3A&[System.AreaPath]=Orcas%5CBuild%5CTeam%20Build&[System.IterationPath]=Orcas%5CRosario%5CBeta&[Microsoft.VSTS.Dogfood.IssueType]=Code%20Defect&[Microsoft.VSTS.Common.Severity]=2&[Microsoft.VSTS.Common.Priority]=2&[Microsoft.VSTS.Common.OpenBuild]=21022.08&[Microsoft.VSTS.Dogfood.OpenedBranch]=Orcas%20RTM&[Microsoft.VSTS.Dogfood.HowFound]=Dogfooding&[Microsoft.VSTS.Dogfood.Source]=Development&[Microsoft.VSTS.Dogfood.ProductUnit]=TFS&[Microsoft.VSTS.Dogfood.TeamLevel1]=Team%20Build&[Microsoft.VSTS.Dogfood.Blocking]=Not%20Blocking


That link will create a new Orcas Bug work item in the Orcas team project that I can use to quickly file a bug on the TFS Build feature.



  • Title starts with “Bug Bash:”

  • Area Path is “Orcas\Build\Team Build”

  • Iteration Path is “Orcas\Rosario\Beta”

  • Issue Type is “Code Defect”

  • Severity is “2”

  • Priority is “2”

  • Build is “21022.08”

  • Branch is “Orcas RTM”

  • How Found is “Dogfooding”

  • Source is “Development”

  • Product Unit is “TFS”

  • Team Level 1 is “Team Build”

  • Blocking is “Not Blocking”

With all of that filled in automatically, all I need to do after clicking the link is fill in the Description and Repro Steps.  That’s a lot faster!


Previous tip: TSWA tip: Copy a bug to quickly file a new bug in an area related to the original


Comments (7)

  1. kenobonn@yahoo.com says:

    Similar to how you provide a link to a template, can I do same to query for work items? Suppose I have a list of three bugs, bugID 3,5,7. I want to send my users a link in TSWA to see the query results window for those three bugs, by specifying their ID’s (not some crazy guid).

    If not possible, I would propose a feature request to provide the "globe with chain link" in the query editor window. This would be very beneficial for my users, so they would not need to store a team or my query.

    Thanks Buck for the great tips and new features!

  2. buckh says:

    Ken, the current CTP release has a feature in it that lets you specify WIQL in an URL.  That’s the closest thing.  However, I doubt you had writing WIQL in mind.  :-(

    http://<server>/q.aspx?pname=MyProject&wiql=SELECT ID, Title, State FROM WorkItems WHERE [Team Project]=’MyProject’ AND [Work Item Type]=’Bug’ AND [Found In]=’9.0.30304′

    You are probably better off to just use multiple work item URLs for now.

    Buck

  3. I am using exactly what you are saying (read the query in my latest post to the discussion). I tried to post that twice but was denied. Is there a rule that prevents replying to your own comment?

    I’ve been writing WIQL for about a year now via the SDK to integrate my web application with multiple TFS servers, not sure why you would think I would be adverse to writing WIQL :)?

  4. buckh says:

    I see your email now (I didn’t read it prior to posting).  Since I like your example better, I’ll post it here.  I think your willingness to write WIQL is certainly more than most.

    http://mytfs:8090/q.aspx?pname=MyProject&wiql=SELECT%20ID,%20Title,[Assigned%20To],[Finish%20Date]%20FROM%20WorkItems%20WHERE%20ID%20IN%20(400925,400926,400927,400928,400929,400930,400931,400932,400933,400934,400935,400936,400937,400938)

    Buck

  5. Buck Hodges says:

    We’ve now released the final version of TSWA 2008 SP1, which had previously been released as a community

  6. Bernd Wechner says:

    When It try:

    http://<server>/q.aspx?pname=MyProject&wiql=SELECT ID, Title, State FROM WorkItems WHERE [Team Project]=’MyProject’ AND [Work Item Type]=’Bug’ AND [Found In]=’9.0.30304′

    My server just responds:

    Query id not specified. Close this window and try again.

    Apparently we have 2008 SP1 installed. What am I missing here? This is just what I need but it isn’t working …

  7. buckh says:

    Bernd, which version of TSWA do you have installed?  It needs to be TSWA SP1, which is separate from TFS SP1, for this feature to work.  The other possible issue is that the URL isn’t escaped.  See my comment a few up from this one for an example.

    Buck