This document explains how to use the custom sprint data seeding functionality with predefined teams and team members.
The custom seeder creates:
-
Weekly Sprints:
- Generates sprints starting from January 1st
- Each sprint is exactly 1 week long (7 days)
- Creates sprints up to the week before April 4th, 2023
- All sprints are marked as completed (100% progress)
- No planned or active sprints are created
-
2 Teams:
- Team Alpha
- Team Beta
-
2 Reports per Team per Sprint:
- Latest version and a previous version for each team
- Each report includes team member data with story points
- Bug data is only included in reports for the last sprint
- Backlog of bugs from previous sprints is included after Sprint 1
-
Predefined Team Members:
- XBananAX
- Narathip Saentaweesuk
- Patyot Sompran
- Pawarit Sinchoom
- Natchaya Chokchaichumnankij
- Niyada Butcahn
- Sutaphat Thahin
- Thanakorn Prasertdeengam
The easiest way to seed the custom sprint data is to use the provided Artisan command:
# To add sprint data to your existing database
php artisan sprints:seed-custom
# To refresh your database and add sprint data
php artisan sprints:seed-custom --freshThe --fresh option will run migrate:fresh before seeding, which will drop all tables and recreate them.
You can also run the seeder directly:
# Run just the custom sprint seeder
php artisan db:seed --class=CustomSprintSeederThe sprints follow this structure:
- Sprint 1: Jan 1 - Jan 7
- Sprint 2: Jan 8 - Jan 14
- Sprint 3: Jan 15 - Jan 21
- And so on, up to the week before April 4th
-
Team Members:
- Each report includes 3-5 randomly selected members from the predefined list
- Each member has assigned story points, completed points, and completion percentage
-
Story Points Summary:
- Total points assigned across all team members
- Total points completed
- Percentage completion
-
Bug Data (only in the last sprint):
- Random number of bugs (0-8)
- Each bug has a title, points, and priority
- Bugs may be assigned to team members
-
Backlog (in all sprints after Sprint 1):
- Accumulated bugs from previous sprints
- Each bug has a title, points, priority, and origin sprint
- Bugs may be assigned to team members
- Displayed in a separate section below the current sprint's bugs
If you need to modify the data, you can:
- Edit the
$teamMembersarray inCustomSprintSeederto change team members - Edit the
$teamsarray to change the team names - Modify the reference date in the seeder to adjust the sprint range
- Adjust the sprint duration (currently set to 1 week = 7 days)
- All dates use the Asia/Bangkok (GMT+7) timezone and are displayed in 24-hour format
- The latest report for each team is marked as auto-generated, while the older version is marked as manual
- Report dates are evenly distributed throughout each sprint period
- All data is consistent with the specified team members