Extracting time estimates from user stories typically involves identifying and interpreting any expressions related to time, effort, or complexity. These estimates can be explicitly stated (e.g., “5 hours”, “2 days”, “3 story points”) or implied. Here’s a step-by-step approach you can follow to extract time estimates from user stories:
1. Identify Estimate Keywords
Look for common keywords and formats used in user stories, such as:
-
Time-based:
hour(s),day(s),week(s) -
Effort-based:
story points,SP,t-shirt sizes(e.g., XS, S, M, L, XL) -
Numeric formats:
2h,3d,5 SP,4 hrs
2. Use Pattern Matching (Regex)
Apply regex to extract these patterns. Some examples:
3. Parse the User Story
For example:
User Story:
“As a user, I want to reset my password so that I can regain access to my account. (Estimate: 2 SP)”
Extracted Estimate: 2 SP
4. Convert to a Uniform Format (Optional)
To compare or aggregate estimates, you might normalize:
-
1 SP = ~4 hours (or any internal metric)
-
XS = 1 SP, S = 2 SP, etc.
5. Handle Stories Without Estimates
If a story lacks an estimate:
-
Flag it for review
-
Optionally apply historical average estimates from similar stories
Example Workflow in Pseudocode
Example Outputs
| User Story | Extracted Estimate |
|---|---|
| “Implement login feature (Estimate: 3 SP)” | 3 SP |
| “Fix password reset bug – should take 2 hours max.” | 2 hours |
| “Add dark mode (L)” | L |
| “Set up CI/CD pipeline” | None found |
Tools That Support Extraction
You can automate this process using:
-
Jira REST API (if your stories are in Jira)
-
Natural Language Processing (NLP) tools
-
Excel with formulas/macros
-
Custom Python scripts with
reandpandas
Final Tip
For consistent and accurate estimates, teams should use a standardized format for expressing estimates within user stories or as metadata (e.g., labels or custom fields).