0

So I ran into this issue today while creating a TFS 2010 Backup Plan

by Angela 31. October 2012 13:30

So as you would expect, I as a consultant do not have god-like access to things in production like I do in the dev and test environments.  So occasionally I get tripped up on access rights, and when it comes to TFS, well, they could do a much better job of listing out all the places where you do and do not need Admin rights, sysadmin rights, farm admin rights… Well, it’s all out there between the Ranger Guidance, best practices documents, install docs and MSDN documentation but you have to do a LOT of cross referencing to get it all.  And sure, ideally anyone who is a TFS admin would be able to just ask nice and smile and get all those rights, but this is the real world and many large companies are PARANOID about handing out access like that to production.  I had to fight to get the minimal rights documented in the TFS guidance, let alone anything extra.

While upgrading TFS 2010 to 2012 at this current client, I am stopped dead in my tracks at least a few times a week, sometimes a few times a day, by “Access Denied”. My most recent one was extra tricky because it involved a Power Tool and as you know, those are often not documented very well. So, on to my story…  I was setting up a Backup Plan on TFS 2010 using the nifty Power Tools feature (see screen below) from the Admin console.  I login to the TFS application tier with my account, a TFS Admin user.  I know that my account has sysadmin rights on SQL because I am a TFS Admin, and when it comes time to providing the account to run the backup plan under I provided the TFSService account which I know has Administrator and sysadmin rights on the data tier server:

image

So between those two accounts I would think everything was OK. I don’t know for sure, but if the Backup Plan is running as the TFSService account the way it is setup here, well that account is king of the world so everything should “just work”. And yet:

clip_image002

So to hopefully make this something that comes up when someone else does a search on this message, here is what I saw - “Error    [ Backup Plan Verifications ] The current username failed to retrieve MSSQL Server service account. Please make sure you have permissions to retrieve this information.” 

WTH?! And when I opened up the error log the first error I encountered was:

TFS upgrade xp_regread() returned error 5, 'Access is denied.' xp_regread() returned error 5, 'Access is denied.' 

Again, WTH?!

So the DBA goes off and starts researching what xp_regread() does, and tried to figure out why this isn’t an issue in our dev and test environments given that everything was setup the same, and I start digging through forums.  Finally I find one sad and lonely little post on the MSDN forums related to the issue that recommends 1) logging in as a TFS Admin user (OK, I’m with you) and 2) “ensure that the user who perform this Backup Plan have required permission in SQL Server”.  Wait, what?  Be more specific please. What *ARE* the required permissions??  This happens all the time. Don’t tell me to “make sure you have appropriate permissions” without clarifying what those are. Otherwise, well, duh! I *think* I have the right permissions but clearly I am mistaken.

I dig through the Ranger Guidance which as far as I can tell is the only place this tool is documented.  It doesn’t say the person CREATING the backup plan has to be an admin on SQL, and it IMPLIES the account specified to run the job has to be an ADMINISTRATOR but only because the example specified a  Administrator account. Here, right from the guidance:

image

But even that doesn’t necessarily imply a SQL admin, and nowhere in the doc does it say what rights either account (logged in user or “Account”) should have. I just went back and read it AGAIN, does not say anything IRT rights of either of those users in the Guidance. I suppose if you knew what it was doing behind the scenes you could infer the rights needed from the MSDN docs (I found this later). I made an educated guess that because in dev and test I am a server Administrator on the DT, and the Backup worked just fine there, that me being a SQL Server Admin must be a requirement.  So I logged back into my production TFS AT with another account that I knew was admin on every server in the TFS implementation (I know, I know), and the backup plan was created just fine. .

Our DBA does NOT like making TFS admin accounts SQL Administrators, but if I can show him explicit rules that say YOU CANNOT DO YOUR JOB AS A TFS ADMIN WITHOUT IT, he will do it.  So please Microsoft, don’t make it so darn difficult to divine what rights all of the accounts need for the various tasks the user will do. Particularly the Power Tools which make people nervous anyway.

Tags:

ALM | Application Lifecycle Management | MSDN | Team Foundation Server | TFS | TFS 2010 | TFS 2012 | TFS Administration | TFS Power Tools | TFS Rangers

0

Default Roles and Permissions for TFS 2012 in and Handy Dandy Spreadsheet

by Angela 23. October 2012 11:47

So we’ve already had one situation where we had to use a recover command and lost all of our permissions, roles, etc. Restoring them can be a HUGE PITA because while Microsoft was kind enough to document them, you need to cross reference two different pages to see both the default permissions themselves, and the default assignments of those permissions to TFS groups and roles. BUT you cannot easily visualize them in the format you would see them in when setting your permissions.  IOW, you are setting values in a dialog like this:

image

But the documentation is provided in this format:

image

NOT HELPFUL right? I had to search the pages by role or group, highlight where they showed up, and :: scroll, scroll, scroll:: to find all of the places where they existed to set the values. The documentation is NOT in line with the implementation. I kept thinking “if only this was in Excel, I could sort, and filter and SEARCH. There would be unicorns and rainbows!!” I searched, no one seemed to have posted a permissions matrix on-line and my buddies on the product team claimed no knowledge of one. They did say if I created one they would love to have it. And after the help they’ve given me lately, how could I say no?  Smile

I am more than a bit OCD and just sucked it up and spent the time building this in a spreadsheet format that was sortable and filterable.  It is EXPLICIT permissions only, so those listed in the two referenced source pages. So I spent about 2 hours building this, but in the long run it will save me FAR more than 2 hours. JUST LOOK!

image

You can access the spreadsheet here, and all sorting and filtering work: https://skydrive.live.com/redir?resid=E796C9484DF4BAA3!10019&authkey=!AJ0OZWvOhG8OjHs  Note that I separated it into 2 worksheets, Server, Collection and project level in one, and everything else in the other.  I was going to put it all into one, but there were WAY too many columns and it was hard to read. 

 

Again I say, you’re welcome! Please let me know if you notice anything I might have missed, I am human after all.  Since it is SkyDrive updates will be posted in real time as I fill in any gaps or make corrections. If you feel compelled to repay my kindness I love dark chocolate and gerber daisies. Consequently if you meet up with me at a user group or tech event and want to thank me, I also prefer Hendricks gin Winking smile

Tags:

ALM | Application Lifecycle Management | MSDN | TFS 2012 | TFS Administration | Team Foundation Server | Visual Studio 2012

0

So You Were Forced to Use the dreaded TFS Collection /Recover Command, Now What?

by Angela 11. October 2012 08:23

Since we have used Recover on a production database and lived to tell the tale I thought I would share our experiences. If you read this post you will know that one of my client’s got themselves into a world of hurt where we needed to restore a nightly backup that was not detached.  I know, I know, detached backups are the way to go.  Well, now THEY know that too Winking smile  Nonetheless, sometimes you may find yourself needing to recover a TFS Team Project Collection (TPC) database, and if you’ve read the MSDN documentation you’ll know this is not an ideal situation. The Recover command is very lossy, BUT you get your data back. And in our case it was worth the risk.

So here is the backstory…  Someone deleted a Test Plan with a month’s worth of data in it, and if you know MTM you know there is no “undelete”. Restoring a backup was our only hope. BUT our nightly backups are SQL backups of the entire SQL Server instance, so undetached (we are addressing this NOW). Plucking one TPC out of there and attaching it is just not an option. And we did not have hardware to restore the entire thing and detach it properly.  So here is what we did:

  1. Restore the backed up TPC from the nightly backup into our dev TFS environment
  2. Used the TFSConfig /Recover command, followed by TFSConfig /Attach to get it attached in dev
  3. Used the TFSConfig /Recover command to get the TPC into the proper state
  4. Detach the hosed TPC from production
  5. Restore that detached version of the TPC to production
  6. Attach the backup to production (we actually hit an interesting bug in TFS 2010 at this point, so the attach was quite harrowing and involved an emergency hotfix to our TFS sprocs, I may blog about later.)

Now, I would love to say everything was perfect but the recover command did blow away some things that we had to get back into place before people could use the TPC again.  What we lost:

  1. All the security setting ever!
    • Collection level groups and permissions
    • Team Project (TP) level groups and permissions in every TP in the TPC
    • Permissions around Areas and Iterations in every TP in the TPC
    • Permissions around Source Control in every TP in the TPC
  2. SharePoint settings  (in every TP in the TPC). Settings on the SharePoint server themselves will be fine of course but you will probably see a “TF262600: This SharePoint site was created using a site definition…” error when you try to open the portal site that was once attached to those TPs. You will need to fix this in 2 places.
    • Go to TFS Admin Console, select the TPC you just restored and make sure the SharePoint Site settings for the TPC are correct. It will probably be set to “not configured” now.
    • Open team explorer (as an Admin user), and for each TP go to “Team Project Settings | Portal Settings” and verify everything there is correct. Ours were just plain gone so we had to enable the team project portal and reconfigure the URL.
  3. SSRS Settings – this will probably be fine if you restored the database as-is but we also renamed it as part of the restore, and so had to update the Default Folder Location through the Admin Console for the TPC in order for this to work again.

So word to the wise, make sure you understand what the settings above are for all of the TPs in your TPC BEFORE you perform a Recover command because chances are you will have to manually set them all back up.

Tags:

ALM | Application Lifecycle Management | MSDN | MTM | Microsoft Test Manager | Microsoft Test Professional | TFS | TFS 2010 | Team Foundation Server | VS 2010 | Visual Studio | TFS Administration

0

So you accidentally deleted your MTM Test Plan, Now What?

by Angela 10. October 2012 04:14

So this week, we had a little bit of fun, by which I mean a day that started with panic and scrambling when someone accidentally deleted a Test Plan (yes, a whole test plan) in MTM in production. A well established test plan with dozens of test suites and over a hundred test cases with a month’s worth of result data no less... Some important things of note:

  • test plans are not work items, they are just a “shell” and so are a bit easier to delete than they should be (in my opinion)
  • there is no super secret command-line only undelete like there is for some artifacts in TFS, so recreate from scratch or TPC recovery are your only options here to get it back
  • when you delete a test plan, you lose every test suite you had created.  Thankfully, not test cases themselves, those are safe in this situation.  Worst case, a plan can be created, although it is tedious and can be time consuming.
  • when you delete a test plan, test results associated with that test plan will be deleted*. Let that sink in – ALL OF THE TEST RESULTS FOR THAT TEST PLAN, EVER, WILL ALSO BE DELETED.  ::this is why there were flailing arms and sweaty brows when it happened::

So at this point, you may be thinking it’s time to update your resume and change your phone number, but hold up. You may have some options to recover that data, so buy some donuts for your TFS admin(I like cinnamon sugar, BTW).  I should mention, there may be a lot of other options but these are the three I was weighing, and due to some things beyond my control we had to go with #2.

1) Best Case Scenario: restore your DETACHED (this is required) team project collection database from a backup, cause you’re totally taking nightly backups and using the TFS Power Tool right? You lose a little data depending on how old that backup is, but it may be more important to get back your test runs than have to redo a few hours of work.

2) Second Best Case Scenario: If you cannot lose other data, and are willing to sacrifice some test run data, then restore the TFS instance from a traditional SQL backup to a separate TFS instance (so, NOT your production instance), open up your test plan in that secondary environment, and recreate your test plan in production.  Not ideal, but if you didn’t have a ton of test runs this may be faster and you don’t sacrifice anything in SCM or WIT that was changed since the backup was taken.

3) Worst Case Scenario: if your backups were not detached when you did your last backup, cry a little, then use the recover command to re-attach them. The gist is to use the TFSConfig Recover command on the collection to make it “attachable” again, then attach it to your collection. I have written a separate post on this because it can be complicated…

Once you are back up and running, make sure rights to managing test plans is locked down!  It might not be obvious that you can even do this, or where to find it, since it is an “Areas and Iterations” level permission. But do it, do it now!  This permission controls the ability to create and delete Test Plans, so be aware of that. But for the most part, anyone with authority and knowledge to delete entire Test Plans, considering what they contain, should be the only person creating them.  If everyone needs the ability to create/delete these willy-nilly, then you are doing it wrong, in my opinion anyway.

I am still in the midst of getting this back up and running so will update once we’re finished. There is an MSDN forum post out there regarding one bug I seem to have uncovered, if anyone wants to look at it and maybe fix my world by answering it Smile I am sure I’ll be able to add some more tips and tricks by then.

0

August Chicago ALM User Group - Announcing Git Integration with TFS

by Angela 16. August 2012 10:43

I know, Microsoft supporting non-.NET developers and non-Windows folks? Inconceivable! ::gasp:: 

OK, so if you’ve been paying attention for the past couple of years, you might already know that this has been happening slowly. But recently there have been some seriously MAJOR developments. First, Microsoft made Entity Framework open source, and now they have added MVC, ASP.NET and more to that list. Dogs and cats, living together, mass hysteria…and all that.  Then when you thought it couldn’t get crazier, they announced TFS integration with Git!  My head just exploded a little, how about yours?

Come to the Chicago Microsoft office on August 29th and meet one of the TFS product team members, you heard it, ONE OF THE DUDES WHO WRITES CODE FOR TFS ITSELF! Edward Thomson will be discussing how to take advantage of the new git-tf tool to synchronize a local git repository with Team Foundation Server.  This cross platform bridging tool is especially useful for cross-platform developers, such as iOS developers on Xcode.

Edward Thomson is a Software Development Engineer at Microsoft, where he works on cross-platform version control tools for Team Foundation Server.  Before joining Microsoft, Edward worked on numerous source code control tools for Microsoft and Unix platforms.

Register now to make sure you get a spot. Building security also requires it, and it helps me not order gobs of food no one will show up to eat.  So help a girl out huh?

Tags:

ALM | Application Lifecycle Management | MSDN | SDLC | TFS | Team Foundation Server | VS 11 Beta | Visual Studio | Open Source | git | TFS 2012

0

Microsoft Test Manager (MTM) Tip O’ the Day–Filtering test lists

by Angela 3. July 2012 07:41

Now, I am no @ZainNab, the guru of “Tips and Tricks”, but I occasionally run across features that have been staring me in the face for YEARS and yet somehow went completely unappreciated, sometimes unnoticed.  And then one day it hits me and OMG my life is easier, and I want to tell everyone.  Sure, it’s a bit embarrassing to admit sometimes given that I worked at Microsoft for 5.5 years focusing on the Visual Studio tools, but who hasn’t done that?  Not you? Really?  I am skeptical…  There are after all, a bajillion commands to try and remember. For real, if you don’t believe me, look at the entire book that Sara Ford and Zain wrote about it. It’s worth every penny and Amazon has a great deal on it, pick up a copy! Smile

So, back to my point. I was sitting in MTM, looking at a fairly daunting list of PBI based test suites, thinking “now which PBI’s were the ones where I had test cases to run again?”  I started thinking about writing a query, but that only helps is YOU are assigned to the test case, it doesn’t really help with test RUN assignment. Then it all came flooding back.  Wait, there’s this FILTER button to sort that out.  And conveniently it’s right there in front of my face ::face palm::  I felt a little better when no one else admitted to noticing it was there either. Maybe they were just being nice to me.  Either way, in case you didn’t notice it, check it out. Before:

Untitled

After, I have MUCH fewer test suites that I have to look at:

Untitled2

That’s my Microsoft Test Manager tip o’ the day!  I won’t be posting them every day like Zain has been doing on his blog around Visual Studio 2010 for the past couple of years, of course I also don’t mainline 5 hour energy like he does Smile  I will do them whenever I can.  Hope this was helpful! Feel free to post any tips of your own or shoot me a note if you have other questions or comments.

0

Sneak Peek of Visual Studio 11 - Coming to a City Near You!

by Angela 24. April 2012 06:34

You may have noticed a little hoopla lately around the coming version of Microsoft Visual Studio’s ALM product line. I’ve been using it for a few months now, and it’s pretty rad! I came across a great set of events coming soon to several cities across the Midwest, to give you a sneak peek at the new ALM capabilities in Visual Studio 11 and Team Foundation Server 11.

This half-day event of presentations and demos will be delivered by your local Microsoft Technical Specialist. In case you are thinking, “my Microsoft whosit?”, 6 months ago this would have been me, so maybe that helps if you knew me before I was a Polarisian, Polarisite, uhhh, I’ll work on that one.  Click below for the city schedule in your area and to view full session descriptions for each event:

Date

Location

Registration URL

5/9/2012

Indianapolis

AM Session - Visual Studio 11

5/11/2012

Chicago

AM Session - Visual Studio 11

5/15/2012

Milwaukee

AM Session - Visual Studio 11

5/17/2012

Downers Grove

AM Session - Visual Studio 11

LOOKING TO EXPERIENCE WINDOWS AZURE? Join us in the afternoon at the same location for a BONUS event. Who doesn’t like a bonus?!  After each ALM event noted above, a Hands-On Experience with Windows Azure will also be happening, where Microsoft will explore how to leverage the Windows Azure platform for your own applications. Microsoft experts will show off the platform's powerful features, walk through tools to get started, and guide you in building and deploying your first cloud based application. The great news for MSDN subscribers is that you get Windows Azure cloud computing benefits for free every month with your subscription. Click below to register for the afternoon session!

Date

Location

Registration URL

5/9/2012

Indianapolis

PM Session - Hands On with Windows Azure

5/11/2012

Chicago

PM Session - Hands On with Windows Azure

5/15/2012

Milwaukee

PM Session - Hands On with Windows Azure

5/17/2012

Downers Grove

PM Session - Hands On with Windows Azure

Visual Studio 11 Beta!

Prepare for the next generation of development. You can’t predict the future, but you can get there first! TRY the Visual Studio 11 Beta Today!

Tags:

ALM | Agile | Application Lifecycle Management | MSDN | TFS | SDLC | Team Foundation Server | Testing | User Acceptance Testing | VS 11 Beta | Visual Studio | Work Item Tracking | Azure | Cloud Computing

0

Upgrading Team Projects from Agile 4.2 to Agile 5.0 on TFS 2010–Part 3, Swapping in the QoS Requirement

by Angela 28. March 2012 07:33

So if you’re reading this you are probably finishing up my 3 part story about updating a process template from Agile 4.2 to Agile 5.0 on a TFS 2010 server.  This is the last installment where I embarrass myself further by sharing one more stumbling block that I encountered along the way.  So now we have all of our awesome tools installed, we downloaded Hakan’s script, we got our work item definitions imported and updated, and finally added our trusty old Quality of Service Requirement to the new Requirements Category in the process template.  Everything was working beautifully until I went and tried to link a QoS Requirement to a Test Case. Cue Sad Trombone again…

image

This was certainly not handled in any script, and I couldn’t find any documentation of it on MSDN, so hey, maybe this is something actually NEW in terms of guidance Smile  As soon as I saw this I knew what was happening.  I was pretty sure that somewhere there was some XML specifying what work item types were allowable in that dropdown, and my guess was QoS Requirement was not one of them.  I would have thought it was covered in the updated TestCase.xml used by Hakan’s script, or that maybe it was using the “Requirement Category” from Cateogires’xml but that would have covered QoS Requirement.  I double checked and it was not.  Here is the xml included with the script, note only “User Story” is allowed here:

image

I went ahead and made a little tweak so that QoS Requirements were allowable for the “Tested User Story” functionality and re-imported the TestCase work item definition using the Power Tools.  Essentially all I had to do was add my work item type to the TypeFilter node in the XML:

image

And now when I click “New” or “Link To” from a TestCase work item, I have access to my Quality of Service Requirements, HUZZAH!

image

Now, I am sure this is intentional. I assume in most cases you really only want “User Story” type work items to be linked in this particular tab, but for our purposes this is what we are looking to do.  I was a little curious as to why Hakan’s update script did not include the User Story work item type definition…  But hey, at the end of the day I demystified some more of the “magic” going on behind the scenes in TFS.  I am currently digging in a bit more to figure out if it makes sense to add User Stories to these upgraded Team Projects as well, since there are some very different fields and metadata being collected on them.  As I mentioned before, these are mostly inactive projects I am “experimenting on” so I’d love to hear and feedback or opinions on what you have done with your own projects.

OK, one last pro tip before I go. How often do you get an error dialog from TFS or VS, and you want to Google or Bing it, but now you have to type in all of the text by hand and hope you don’t miss a letter or number?  For me, daily!  *Sometimes* you can copy and paste the test, sometimes there is even a tool or link to let you copy it, but often times you are on your own. I totally ran into this on accident the other day.  So in OneNote you have a great screen capture tool that will work in any app, even on the desktop.  Make sure you have opened the OneNote app at least once, and seriously if you haven’t you’re crazy cause it’s the only tool I use for taking and sharing notes.  Hit Control+S, drag the cross hair around what you want to capture and let go. Copy the image to your clipboard and paste anywhere.  Cool huh? It gets better.  I noticed if you right click an image, you get the option to “Copy text from picture”. I saw that and thought, “no way that works!”, and lo and behold it does.

image

You’re welcome Smile

That’s it for now, hope you learned something in reading about my adventures in process template upgrading.

 

Part 1 – Process and Tools

Part 2 – Field Mismatches

Tags:

ALM | Agile | Application Lifecycle Management | MSDN | Power Tools | SDLC | TFS | TFS 2008 | Team Foundation Server | TFS 2010 | Test Case Management | VS 2010 | Visual Studio | Work Item Tracking

0

Upgrading Team Projects from Agile 4.2 to Agile 5.0 on TFS 2010– Part 2, Field Mismatches

by Angela 28. March 2012 07:05

So hopefully you’ve already scanned through this other post where I cover the overall process I used for doing my updates. It also has some great tips and tricks for making the whole job easier using a few free tools, as well as a few links to helpful blogs and MSDN resources to save your sanity! So, that being said, here are some of the issues I encountered during my upgrade, and how I was able to work around or fix them.  Again if you are using Hakan’s script and just running as-is, you might not see some of these errors.  I just figure you learn more by screwing up, and I was working with some test projects and so had the luxury of being able to try out several different strategies without affecting anything critical, and so I did a lot of things by hand first.

First stumbling block I encountered during the upgrade was a weird issue with inconsistent “friendly names” for some of the fields.  Essentially, I had some naming collisions when I tried to import some of the new artifacts like SharedStep.xml and TestCase.xml.  You might at some point encounter an error message similar to “TF26177: The field XxxXxx cannot be renamed from ‘XxxXxx’ to ‘Xxx Xxx ’.” In other words, “Area ID” vs. “AreaID”, “Iteration ID” vs. “IterationID” and a few others.

image_thumb[6]

The ones I was importing had field names that didn’t match EXACTLY. Now I started thinking, “But I am just re-uploading the work item type definitions that TFS was ALREADY using. They should be exactly the same right?”.  I opened up the work item type definitions (thank you TFS Power Tools) and found that indeed, some of the field names did NOT match the ones on the server. You’ll note in the screen shot below that in just a handful of cases, a blank character was missing from the field name, so the import process sees this as a rename attempt. You are looking at a new Agile 5.0 Team Project work item definition on the right, and the standard Agile 5.0 Team Project work item definition used to create that new project on the left.

image

In essence, what I ended up having to do to rectify this was to go in and modify the work item template definitions for the appropriate work items to ensure that the field names being imported matched the field names on the server, before attempting to import them again. For me, it was an issue in both the ShareStep and TestCase work item type definitions, but certainly didn’t take long to fix.  Once that was done, I had success! 

image

UPDATE: Turns out some of the fields being used were of course already defined on the server from the previous implementation of TFS 2008, and when TFS 2010 was released a few of the names had been altered slightly. After struggling with this for an hour or two and somehow not running across the documentation stating that this was a known issue, I eventually figured out the fix on my own.  Today, I was kindly pointed to a couple of places where this was documented, including a post by Gregg Borr that was pretty much written specifically to address this very situation ::facepalm::

Last thing we need to do is update the categories.xml. Silly me tried just importing the Categories.xml from the Agile 5.0 template which will of course NOT work because 4.2 requirements were named a bit differently than 5.0 ones.  You’ll see something starting with “TF237059: The import of the category definition failed” because the new Categories.xml will refer to “User Story” and what you have is a “Quality of Service Requirement”.  I opened up the XML provided with Hakan’s script because I was wanted to verify what was happening, and what I was doing wrong, and was not shocked to see that it was essentially updating the “Requirement Category” to support the new world order of work item types. RTFM Angela, RTFM.  Here is what you will see in Hakan’s updated Categories.xml file:

image

So now my categories were imported correctly and I was feeling good but had to do some testing as I was SURE I would encounter some additional problems once I dug into Visual Studio and Microsoft Test Manager and started creating work item types in the new and improved Agile 5.0ish Team project.  It was definitely a trip seeing the co-mingling of the 2 versions of the Agile template in the Team Explorer:

image

For the most part this all “just worked”. I created work item types, linked them together, created hierarchies, opened them in Project and Excel and made changes and published. Life was good.  And then I tried to link a TestCase to a “requirement” in my new world. Wah, wah, wah, waaaaaaaah.  Check out my third post for details on how I managed to fix this.  Again, it could very well have been something I did wrong but it was a lesson learned…

 

Part 3 – Swapping in QoS Requirement for User Story

Tags:

ALM | Application Lifecycle Management | Agile | MSDN | Power Tools | SDLC | TFS | TFS 2008 | TFS 2010 | Team Foundation Server | VS 2010 | Visual Studio | Work Item Tracking

0

Upgrading Team Projects from Agile 4.2 to Agile 5.0 on TFS 2010–Part 1, The Process & Tools

by Angela 28. March 2012 06:51

So, I am NOT calling myself the absolute guru of Team Foundation Server work item tracking or process template upgrades just yet, but I did learn a ton during the process and wanted to share my experience in case you can glean some wisdom from it.  Now I leveraged a LOT of content written by other VERY smart people from the TFS product teams so I try to be sure to give credit where credit is due. I experienced some bumps and bruises along the way because I was following at least 5 different sources on the internet for the upgrade and they did not all contain the exact same info.  Since the same things might trip you up, give the post a quick run-through all the way to the end.  I know it’s a lot to sort through, but you’ve probably played Mine Craft for hours at a time so I am sure you can handle this. Also, I broke it into 3 parts since there is so much to cover and it WAS getting a bit ridiculous, even for me Smile 

We (Polaris Solutions) have a TFS 2010 instance that has a lot of legacy TFS 2008/Agile 4.2 Team Projects on it. I have been working on getting all of those projects upgraded to be more in line with the newest Agile 5.0 templates so that we can take advantage of some of the great features of TFS 2010 like Test Case management, hierarchical work items, new relationship types, and more. Now my life was made easier by the fact that this particular instance was not running SSAS/SSRS or SharePoint, and the original Agile 4.2 templates were unaltered, so really I was only concerned with making basic updates to the process templates and didn’t have to deal with reporting, merging customizations, or enabling the agile planning workbooks. But I still ran into some snags…

So, first thing is first, dump that chump command line and get a more functional one. You’ll spend some time at the command line so might as well not have it be painful.  I seriously owe Scott a big box of Sugar free brownies or something for this. Rocked my world!  If you’re not a fan of the command line, download the TFS 2010 Power Tools which will give you a lovely GUI interface for doing things like downloading your process templates and exporting/importing work item definitions and global types.  I actually switch between them depending on the task.  Also, the Power Tools just got updated in December of 2011, and some of the new features will bring a tear to your eye.

Next, download Hakan’s update script. Make note that you must be upgrading from a virgin Agile 4.2  process template to a 5.0 one to be able to just run it and be more or less done. If you have some customizations the script will still come in handy but you may need to tweak it, or reverse engineer your customizations back into the resulting template. Hope you documented all those changes, hehe. But don’t panic, the first thing his script does is back up your original template before changing it. Like I said, he’s a smart dude.  Here is what you will see when you grab the zip file and unpack it:

image

It includes a batch script to execute all of the necessary backup and import operations, a new Categories definition, 2 new link types (TestedBy and SharedStep), and new (SharedStep, TestCase) and updated (Bug, Scenarios, Task) work item definitions. Even if you decide not to use his script, these files could come in handy for manual updates as well, so I suggest grabbing it nonetheless.

Now honestly, I’m not one for blindly running ANY script, even one written by someone as awesome as Hakan, so I dug through his script line by line, looked at the artifacts it used, and compared it to the documentation on MSDN for updating old process templates to leverage new functionality.  I realized that the first couple of steps could be skipped altogether since I had some TFS 2010 projects in that collection already, and so things like categories and link types already existed.  You will see in a later post that this bit me in the butt Winking smile Uploading any of the template artifacts using Hakan’s script won’t hurt anything so long as you haven’t modified the ones on the server, import = overwrite in this case.  I did a lot of it by hand at first, using my spiffy new command line tool and the power tools just so I would understand better what was happening.  Once I was comfortable with that, I updated another project using Hakan’s script. Much faster process and way fewer errors, shocking right? Hehe.  I did run into a couple of errors that the script could not handle; one that I address in my next post that has to do with some “friendly name” value changes between 2008 and 2010, and another having to do with something that may or may not be a standard practice which I address in my third post.   For now my process is to start with Hakan’s script to get the imports done quickly, then make manual tweaks to bring the template the rest of the way in line to what we need. 

Now if unlike me you do also have SSRS/SSAS and SharePoint installed and need to turn on some other features, check out Aaron’s post and Allen Clark’s post on how to finish up the upgrade. Like I said, mine was a little less involved but those articles are widely held as THE ones to use as a guide if you find yourself in this situation as well. Hopefully I sprinkled in some tips and tricks to help you out as well Smile

One last thing you absolutely should have any time you need to work with process templates is a good compare tool.  I ran across 2 tools used for visualizing process template artifacts that saved my butt!  The first is the “Team Project Manager Tool” on CodePlex. Gives you a quick and easy way to look the XML in your template, do quick comparisons, but also includes tools to help you visualize/manage build templates, security and even source control. I love this tool SO MUCH!

image

And while in this instance I did not need it as much, the TFS Rangers Integration Platform Mapping Tool is a pretty neat tool and came in pretty handy too. When I had an instance where I wanted to quickly compare two WIT definitions and see how the fields mapped and where there were differences, it had some great visualization capabilities:

image

Well that’s it for my process and tools bit.  I have 2 more posts that cover issues I ran into with field mismatches, and making changes to allow for QoS requirement work items to take the place of User Story work items. They will be posted shortly!

 

Part 2 – Field Mismatches

Part 3 – Swapping in QoS Requirement for User Story

Tags:

Visual Studio | Team Foundation Server | TFS | MSDN | Application Lifecycle Management | Agile | ALM | Work Item Tracking | Requirements Management | Test Case Management | SDLC | Power Tools | TFS 2010 | TFS 2008 | VS 2010

Powered by BlogEngine.NET 2.7.0.0
Original Design by Laptop Geek, Adapted by onesoft