Best ways to fit bug fixing into a Scrum process? [closed]
Solution 1:
This is a very good question and I have some observations when it comes to different approaches to this problem.
- Treating all bugs equally with backlog items might sound like a good idea in theory (work tracked in a single place) but doesn't work well in practice. Bugs are usually low-level and more numerous, so if you create an individual user story for each bug then the "real" stories will get obscured soon.
- Explicit time in each sprint reserved for fixes is fine if done in a way that is visible for the product owner. Bugs should be mentioned during the daily scrum and discussion about bugs fixed should occur during the sprint review. Otherwise the product owner won't be aware of what's going on in the project.
- Putting the whole backlog in bug tracking tool leads to the same set of problems as in 1. Moreover most bug trackers are not designed with Scrum in mind and using them for this purpose can be painful.
The solution we found the most satisfying was to put a single user story called "Tickets" or "Bugs" on every sprint. Then such a story can be divided either into low-level tasks describing a particular bug (if known during planning) or meta-tasks reserving a given number of hours for general bug fixing. This way the product owner has visibility into the process and the burndown chart reflects the progress.
Just remember to mercilessly close all "bugs" that are actually new features and create new backlog items for them. Also make sure to fix all the bugs reported against the current sprint before the sprint is over in order to consider the sprint as done.
Solution 2:
Actually I think that best is answer by jpeacock from this question Do you count the hours spent on bug fixes towards the scrum?
Let me cite it:
- If the bug is easy/quick to fix (one liner, etc), then just fix it.
- If the bug is not trivial, and not a blocker, then add it to the backlog.
- If the bug is a blocker then add a task (to the current sprint) to capture the work required to fix it, and start working on it. This requires that something else be moved (from the current sprint) to the backlog to account for the new hours because your total hours available hasn't changed.
Solution 3:
The first step is to define what a bug is. I teach that a bug is only a bug if it is functionality that does not work in production as it was intended/designed. These become bug type PBIs to be prioritized against new development. Missing functionality in production is a Feature and becomes a normal product backlog item. Any defective code found during a sprint is considered incomplete work and since you don't move on to the next story until the current one is done-done; it is unnecessary to track these defects in the sprint as the team is always working on the offending code. Post-its can be super handy here for quick reminders between team-mates. Fixing broken code always takes precedent over writing new code. If the defects are due to misunderstanding the story then you need to work on your conditions of acceptance before starting the story.
Inventory is waste. Bug tracking is inventory. Bug tracking is waste.
Treating all bugs equally with backlog items might sound like a good idea in theory (work tracked in a single place) but doesn't work well in practice. Bugs are usually low-level and more numerous, so if you create an individual user story for each bug then the "real" stories will get obscured soon.
If you have that many more bugs than features then you need to work on your engineering practices. This is a smell that something else is wrong and tracking is not the answer. Dig deeper. Actually bugs are always smelly. They aren't cool and if you have lots of them you need to find the root causes(s), eliminate those, and stop focusing on tracking bugs.
Solution 4:
Don't track defects on a list, find them and fix them -- Mary Poppendieck
Indeed, If inventory is waste, what about an inventory of defects...
That's why I always try to implement a Stop-the-Line mentality with test-driven development and continuous integration, so that we find and fix most defects instead of putting them on a rework list.
And when defects pass through, we fix them before writing new code (stories with bugs aren't done anyway). Then, we try to fix our process to make it more mistake-proof and detect defects the moment they occur.
Solution 5:
There is no one size fits all solution and each project is different. Bugs might also be categorized from mission critical to hardly worth fixing.
Unless critical to the running of the system, I prefer bugs to become story cards. That makes the priority of feature development vs. bug fixing really explicit. In a scenario where bug fixes are considered to be "outside of the sprint" the bug fixing might move toward fixing really trivial bugs while really important business features aren't being developed.
We've gone trough a number of permutations before setting on the bug as a story approach. Try some different things and replay them at team retro meetings.