2015-03-05

Should bugs be user stories

One topic that seems to come up regularly when teams try to be adopt agile is how to deal with bugs. Since these teams typically give Scrum a try they feel the urge to get as many story points as possible so it is natural to wanting to give these bugs story points so you get some credit for them. IMHO that is a huge mistake.

One of the major mistakes agile-wanna-be teams to is to think that for example Scrum is a solution. But it is not. Yes Scrum has a few artifacts that works as catalysts for the team to improve their behavior but above all it (as all agile methods) high-lights all your problems making sure you see them.

Hence you should absolutely not assign story points to bugs in order to get "the correct velocity" for your team. Bugs are problems in code from the past and if you have a lot of those your velocity should absolutely go down. And you should start thinking about why you have so many bugs and what you can do about it.

Second nobody wants to deal with old code so having a backlog of bugs is a bad idea. You should deal with bugs immediately or not at all. That is; if you consider a bug to be worth fixing you do it right away. Otherwise you close it. If it turns out to be a bigger problem than you thought you can be certain somebody will file the same bug again so don't be afraid of closing bugs without fixing them. This behavior should drive your bug count down to zero. Also remember that if your team requires somebody external to verify bug fixes you need to make sure that happens in timely manner too. Reactivated bugs are just as disrupting as new bugs if it takes a few days to get it validated.

Now there is a pragmatic side of bugs though. Sometimes change requests or other previously unknown requirements are filed as bugs. Or the bug actually is something that you want to fix but only after a few other user stories. In these cases, in order to get bug count to zero, I do encourage you to convert the bug into a user story so you can estimate and prioritize it accordingly. Because in my experience bugs that are desirable to fix but still not important and/or easy enough to fix immediately tend to really be user stories in disguise.

So to sum it all up:
  1. Strive for zero bug count - fix bugs immediately.
  2. Identify user stories disguised as bugs and convert them for future estimation and prioritization.
  3. Close any bugs you don't intend to convert or fix immediately.
  4. ...
  5. Profit!

No comments:

Post a Comment