Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 29 ยท Projects

Project: Sprint Planner

Build a small sprint planner in JavaScript: calculate team capacity, pick backlog items by priority and points, respect dependencies and draft a Sprint Goal.

Sprint Planning answers three questions: why is this Sprint valuable, what can we finish, and how will we do it. A team usually answers them in a conversation around a Jira backlog. In this project you will build a tiny planner that does the arithmetic part of that conversation, so you can see exactly which decisions are mechanical and which need human judgment.

You will calculate the team's capacity, turn it into a points forecast from past Sprints, select backlog items in priority order while respecting dependencies and size limits, and draft a Sprint Goal from what was selected. It uses ideas from Scrum Events, Scrum Artifacts and Commitments and Estimating with Story Points. Everything runs as plain JavaScript in the browser. Jira's own planning screens are not available on this site, so the code is a stand-in that mirrors the logic, not a copy of how Jira works internally.

The planner in four steps

Capacity People, days, leave and focus.
Forecast Convert to points using past Sprints.
Select Take top items that fit and are ready.
Goal Say why this Sprint matters.

The planner suggests; the team decides.

1 / 2

Step 1: Capacity

Capacity is how much working time the team really has in the Sprint. A two-week Sprint has ten working days, but nobody spends all of them on Sprint work. People take leave, join meetings, review code, answer support questions and help colleagues. A focus factor (the share of a day that goes to Sprint work) captures that. Typical values are between 0.6 and 0.8, and each team should measure its own.

So for each person: (working days - days off) x focus. The sum is the team's capacity in person-days.

Person-days are not points. To turn them into a points forecast, we use "yesterday's weather": look at the last few Sprints, divide the points finished by the person-days available, and apply that rate to the coming Sprint. This keeps the forecast tied to what the team actually achieved instead of what it hopes for.

JS Capacity and forecast

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The forecast of 17 points is a planning aid, not a promise. Scrum calls a Sprint a forecast of what the Developers believe they can finish; it is not a contract. Try changing Dara's leave to 0 and see how the number moves.

Step 2: Select items by priority

The Product Owner orders the Product Backlog, so the planner must respect that order. The simplest rule is: walk down the list and add each item that fits. Real planning adds three wrinkles:

  • Ready. An item that depends on another must not be started before its dependency. In the planner an item is only ready if everything it needs is already in the Sprint (in a real project it may also be finished in an earlier Sprint).
  • Size. Very large items (here, more than 13 points) are too uncertain to forecast. They should be split first; see User Stories and Acceptance Criteria.
  • Strict order or fill the gaps? If the next item does not fit, you can stop (strict priority) or skip it and look further down for something small that fits. Strict order respects the Product Owner's ranking; filling gaps uses capacity better. Teams argue about this, so the planner supports both and shows the difference.
JS Select backlog items

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Compare the two runs. Strict order plans 13 points and leaves 2 unused, because "Order confirmation mail" (3 points) does not fit. Filling the gaps squeezes in "Dark mode" (2 points) and uses all 15, but it adds an item unrelated to the checkout work, which dilutes the focus of the Sprint. Neither is always right; seeing the trade-off is the useful part.

Step 3: The Sprint Goal

The planner's goal suggestion simply names the theme with the most points. That is a starting point for a human conversation, never the final text. A good Sprint Goal:

  • is one sentence about outcome, not a list of tickets ("Customers can buy without creating an account", not "Finish SHOP-12, SHOP-15 and SHOP-9");
  • gives the team room to negotiate scope if something turns out harder than expected;
  • is something you can inspect at the Sprint Review.

If the selected items share no theme, that is a warning sign: the Sprint may be a bag of unrelated work with no goal. Either the Product Owner should reorder, or the team should accept that this Sprint's goal is to reduce a particular risk or clear a particular obstacle.

Extending the project

Ideas to try, each one makes the planner more realistic:

  1. Add per-person assignment hints (skills), while remembering that in Scrum the Developers decide who does what; the planner may only suggest.
  2. Reserve a percentage of capacity (for example 20 percent) for unplanned work such as production bugs, and show it as a separate line.
  3. Warn when the planned points exceed the average of the last three Sprints by more than a chosen margin.
  4. Print a plain-text Sprint Backlog that you could paste into a Jira Sprint description.
  5. Add a second dependency check: an item that needs another item finished in an earlier Sprint should be considered ready.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the purpose of a focus factor in capacity planning?

    People spend part of every day on meetings, reviews and interruptions. The focus factor scales working days down to time that is really available for Sprint work.
  2. 2. Why does the planner reject an item of 21 points?

    The 13-point limit is a rule chosen for this planner. Very large items hide uncertainty, so splitting them gives a more reliable forecast.
  3. 3. What is the main downside of filling the gaps with lower-priority items?

    Filling gaps uses capacity better, but it may add work unrelated to the Sprint Goal and bypass the ranking the Product Owner chose.
  4. 4. How should the team treat the points forecast?

    A forecast is the Developers' best estimate of what they can finish. It informs planning but is not a guarantee, and it never replaces the Sprint Goal.

Summary

  • Capacity is working days minus leave, multiplied by a focus factor; it is measured in person-days.
  • A points forecast comes from past points per person-day ("yesterday's weather"), and it stays a forecast, not a promise.
  • Selection follows the Product Owner's order, skips items that are not ready or are too large, and can run in strict or fill-the-gaps mode.
  • A Sprint Goal states the outcome in one sentence; the planner can suggest a theme but the team writes the goal.
  • The code is a stand-in for the thinking behind Jira's Sprint planning screens, not a copy of Jira.

Next, build the query side of a tracker in Project: A Small Issue Tracker with Search.