# Enterprise Agile — Full Lifecycle Manual UAT Script

**Version:** 2026-06-04 (post-stabilization)  
**Environment:** Staging or local with seeded company, department, and project roles  
**Evidence:** Mark Pass/Fail per step; attach screenshots for Critical paths.

## Preconditions

| Item | Required |
|------|----------|
| Backend | `php artisan serve` (or staging URL) |
| Frontend | Built assets or `npm run dev` |
| Config | `AGILE_DEPENDENCY_COMPLETION_MODE=require_override`, `SPRINT_CLOSE_MODE=require_override`, `PROJECT_CLOSE_MODE=require_override` (defaults in `config/agile.php`) |
| Users | One user per role column below |

## Role → test account mapping

| UAT role | System role |
|----------|-------------|
| Super Admin | `is_super_admin` |
| Company Admin | Spatie `company.departments.manage` |
| Department Head | `DepartmentUser` head of project department |
| Project Manager | `ProjectMemberRole::MANAGER` or owner |
| Project Member | `ProjectMemberRole::MEMBER` |
| Viewer | `ProjectMemberRole::VIEWER` |

---

## 1. Project creation (Department Head / Company Admin)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 1.1 | Dept Head | `/projects` → New project | Project created; appears in list | |
| 1.2 | Dept Head | Open project overview | Status `active` or `planned`; department shown | |
| 1.3 | Member | `/projects` create button | Hidden or 403 on API | |

---

## 2. Epics & backlog (Project Manager / Member)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 2.1 | PM | `/projects/{id}/backlog` → Create epic | Epic listed | |
| 2.2 | PM | Create backlog item with estimate MD | Item on backlog; metrics update | |
| 2.3 | PM | Drag reorder backlog | Order persists after reload | |
| 2.4 | Viewer | Same backlog page | Read-only banner; no create/reorder/move | |
| 2.5 | Viewer | `POST .../backlog/tickets` (API) | 403 | |

---

## 3. Work item detail tabs (Member)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 3.1 | Member | Open work item → Overview | Title, MD, status | |
| 3.2 | Member | Acceptance Criteria tab | Add, complete, delete criterion | |
| 3.3 | Member | Dependencies tab | Search ticket, add FS dep, remove; blocker warning | |
| 3.4 | Member | Subtasks tab | Create subtask; list status/assignee/MD | |
| 3.5 | Member | Comments tab | Add comment; author/time (no SLA composer) | |
| 3.6 | Member | History tab | Audit entries for status/deps/AC (not fake) | |
| 3.7 | Viewer | Same tabs | Read-only; mutations disabled / 403 | |

---

## 4. Dependency enforcement (PM)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 4.1 | PM | Blocker open → move blocked item to Done | 422 or override modal (require_override) | |
| 4.2 | PM | Complete with override reason | Success; audit `dependency_completion_override` | |
| 4.3 | PM | Set mode `block` (env) → complete blocked | Hard block until blocker done | |

---

## 5. Sprint planning & capacity (PM)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 5.1 | PM | `/projects/{id}/planning` | Drag backlog ↔ sprint | |
| 5.2 | PM | Capacity panel | Committed MD vs capacity | |
| 5.3 | Viewer | Planning page | No drag; read-only banner | |

---

## 6. Sprint execution (Member)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 6.1 | PM | Start sprint | Status `active` | |
| 6.2 | Member | Board: move columns | Column/status updates | |
| 6.3 | Viewer | Board drag | Cards not movable | |
| 6.4 | PM | Burndown / Velocity pages | Charts reflect completed MD | |

---

## 7. Sprint closure (PM)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 7.1 | PM | Close sprint with open work | Checklist modal lists blockers | |
| 7.2 | PM | Close with override reason ≥ 3 chars | Sprint `closed`; audit reason | |
| 7.3 | PM | Strict mode (config) no override | Cannot close | |

---

## 8. Health & notifications (Admin / PM)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 8.1 | System | Degrade project health (overdue/blocked) | In-app notification once per level | |
| 8.2 | System | Repeat health job same level | No duplicate spam | |
| 8.3 | PM | Sprint health with velocity `down` | Penalty applied (not `declining`) | |

---

## 9. Risks & milestones (PM)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 9.1 | PM | Create risk → resolve | Risk closed | |
| 9.2 | PM | Milestone complete | Status completed | |

---

## 10. Project closure & archive (PM / Admin)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 10.1 | PM | `DELETE` project with work items | 422 archive message | |
| 10.2 | PM | `PATCH .../archive` | `archived`; hidden from default list | |
| 10.3 | PM | Close project with active sprint | Blocked or override per config | |
| 10.4 | PM | Close project with checklist override | `completed`; audit reason | |
| 10.5 | Viewer | Archive / close / delete | 403 | |

---

## 11. Data integrity

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 11.1 | Admin | DB: tickets after archive | `project_id` not null | |
| 11.2 | Admin | Orphan parent tickets | None after project operations | |

---

## 12. Project workspace tabs (PM / Viewer)

| # | Role | URL / action | Expected result | Pass/Fail |
|---|------|--------------|-----------------|-----------|
| 12.1 | PM | `/projects/{id}` overview | Nav cards link to backlog, risks, capacity, reports, settings | |
| 12.2 | PM | Backlog: all items in sprint | Empty state says all items planned into sprints (not “backlog empty”) | |
| 12.3 | PM | `/projects/{id}/reports` | Report hub cards with metric + Open action | |
| 12.4 | PM | `/projects/{id}/dependencies` | Metrics row; table with deep links; searchable create modal | |
| 12.5 | PM | `/projects/{id}/settings` | Details, members, workflow display, danger zone (close/archive) | |
| 12.6 | PM | `/projects/{id}/capacity` | Explanation card, health legend, recommendation column | |
| 12.7 | PM | `/projects/{id}/gantt` | Month/quarter/year, zoom, today, hierarchy rows visible | |
| 12.8 | PM | `/projects/{id}/planning` | Two-panel layout; capacity summary updates on drag | |
| 12.9 | PM | Board: blocked item → Done | Dependency override modal; no silent complete | |
| 12.10 | Viewer | Each tab above | Read-only banner; no create/save/drag/archive | |
| 12.11 | PM | Archive project | Hidden from default list; work items retained | |

---

## Sign-off

| Field | Value |
|-------|-------|
| Tester | |
| Date | |
| Environment | |
| Critical failures | |
| Recommendation | GO / NO-GO |
