Although, almost all ways to solve your problem were already described, I decided to write my answer to to add a little bit organization and references.
Henrik Kniberg in his "Scrum and XP from the Trenches" book describes four typical actions for solving your problem:
#“Too many external disturbances”
Typical actions:
ask the team to reduce their focus factor next sprint, so that they have a more realistic plan.
ask the team to record disturbances better next sprint. Who disturbed, how long it took. Will make it easier to solve the problem later.
ask the team to try to funnel all disturbances to the scrum master or product owner.
ask the team to designate one person as “goalkeeper”, all disturbances are routed to him, so that the rest of the team can focus. Could be the Scrum master or a rotating position.
Let's take a look at these options:
- Ask the team to reduce their focus factor next sprint, so that they have a more realistic plan.
It's the same as @JillSanderson answer. But, in my opinion, it's better to use focus-factor instead of reducing capacity. It give absolutely the same effect (reduced velocity), but it's more logical.
"Focus factor is an estimate of how focused the team is." More unexpected "external" tasks means less focus factor. So, you should consider the focus factor in the Sprint Forecast.
This approach have one limitation. Focus factor (amount of "external" tasks) should be approximately the same. Otherwise, forecast tasks for Sprint becomes meaningless.
- Ask the team to record disturbances better next sprint. Who disturbed, how long it took. Will make it easier to solve the problem later.
It's almost the same as @WBW answer. Gather all needed information during Sprints, analyze it during retrospectives, find root of problems and try to eliminate it. Maybe you should increase quality of code with special engineering practice (or improve testing) to not spend such a lot of time on bug fixing. Or, maybe you should delegate some work to another team. Or improve planning for reducing amount of unexpected features from customer. Or something else. It hard to give concrete advice, because it's depends from many factors. It's your job as Team Lead to find and fix these problems.
The main limitation of this approach is that eliminating roots of some problems is not always possible. It's all good in theory, but in real world we often have no enough power to fix all things.
- Ask the team to try to funnel all disturbances to the scrum master or product owner.
Well, it's true, that Product Owner and (especially) Scrum Master should be a "shield" of the Development Team.
Limitation of this approach is obvious. As I had been told before, Scrum Master may have no enough authority to protect well Development Team from unexpected on-demand tasks. On the other hand, business is much more important for Product Owner then Scrum rules.
- Ask the team to designate one person as “goalkeeper”, all disturbances are routed to him, so that the rest of the team can focus. Could be the Scrum master or a rotating position.
It's a "The Batman" answer, provided by @Aurora.
Good solution with two limitation. 1) Amount of unavoidable tasks should be not to big for "Batman". 2) Developer Team should have more then 3 members, otherwise сapacity (in percentage) will decrease greatly.
In any case, the presence of extraneous tasks in Sprint contradicts to Scrum. It will be ScrumBut (not pure Scrum).
Also, you may look at the other methodologies:
- Extreme programming. According to this methodology, customer may change tasks during iteration without any limitation (honestly, there is one limitation: in case if customer will add new task to current iteration, he should remove task (or tasks) with same volume).
Trick is that cost of changes have fixed cost in Extreme programming. This methodology prescribes a lot of techniques how to ensure this. One times I tried to implement this methodology, but it was too extreme for us :-)
- Kanban. This methodology has no iterations at all. When your WIP has a free space, you can take another task immediately. If you have no need in iterations, this methodology may be best choice for you.