Managing sprint dependencies with chained pull requests
Dependent tickets stall a sprint while people wait. Learn how stacked pull requests keep work moving and reduce idle time.

Sprints often contain dependent tickets, either within one team or across several Scrum teams. In a perfect world, dependencies would not exist; in practice, business needs win and dependencies are added to shorten the release cycle. This article describes one way to manage dependent tasks in software teams.

Dependencies between tasks
The old-fashioned way
The straightforward approach is to start a task as soon as its dependency is merged into the main branch. With that approach, some team members sit idle until a task is ready. Eventually there is little or no time left for the remaining dependent tasks. The last tasks are carried over, and the team is unhappy.
Why does this happen even though capacity is correctly estimated? This happens mostly because of idle time while waiting for colleagues to finish. Even small delays compound, especially in short sprints.
Working on dependent tasks simultaneously
There is a way to do this with a small overhead. When team members work on tasks simultaneously, there are several advantages.
Better collaboration
When team members work simultaneously on dependent tasks, it resembles pair programming. One person must understand the upstream task; the other must understand the downstream task. The team gains broader knowledge of the problems being solved.
Avoiding the idle time
When tasks run concurrently, nobody waits for a fix to land. Everyone can work at once, with more ad-hoc discussion as questions come up.
Pull requests ready for code review earlier
When your branch is based on a colleague's branch, approving the original pull request is easier. You already understand how the upstream ticket was implemented, and the original branch has been tested and reviewed throughout implementation. It is no longer unfamiliar territory.
Using chained (stacked) pull requests
This level of concurrency requires the right tooling. With Git-based version control, it is straightforward. The steps below describe the process.

Dependency tree (working on 6 dependent tasks simultaneously)
Outline the dependencies clearly
Define the dependency chain during sprint planning. The pull request chain then follows that definition exactly. Changing the chain mid-development is expensive because of rebasing.
Start with the root tasks first
Every dependency chain has root tasks that depend on nothing else. Work on them can start on day one.
Do core implementation first
This may conflict with test-driven development, where tests come first. To keep the pull request chain manageable, implement the core first. That gives dependent team members access sooner.
Organize and code review in a FIFO queue
The first branch created should be reviewed and merged first. Each merge triggers CI; if it breaks the main build, the problem is fixed while it is still small.
The overhead
Maintaining a chain of dependent branches has benefits, but also some drawbacks.
Rebasing or merging
The chain must be kept in sync, which takes effort. Modern tools offer one-click synchronization with the base branch when there are no conflicts. Use it on demand, when it is safe to pull in upstream changes. When the build is green and the feature works, sync.
Teamwork
A dependency chain needs a collaborative team whose members are willing to talk to each other. It cannot work if people work in isolation.
Dependent tickets are best kept out of the current sprint. When business needs require them to run in parallel, a chain of derived branches is a practical way to manage the dependency overhead.
Related articles
- Comparison metrics for agile teamsMetrics should create equal ground, not a leaderboard. Four comparison metrics that motivate agile teams without punishing them.
- Sheepherding story pointsOpen votes let the first estimate anchor the room. See how the sheep effect skews story points and how to run planning poker honestly.
- The 10% Scrumban rule for every sprintCommitting to full capacity makes every sprint fragile. A 10% Scrumban buffer absorbs risk, protects the sprint goal and lets velocity grow naturally.
About AELBOX
AELBOX is the team behind Scrumpy Planning Poker for Jira. We write about agile estimation, sprint planning and delivery.