Skip to content

RED-77: One-pass due date retarget for roadmap tasks#161

Open
fs21co049adityawaghule wants to merge 10 commits into
mainfrom
feature/RED-77-roadmap-retarget
Open

RED-77: One-pass due date retarget for roadmap tasks#161
fs21co049adityawaghule wants to merge 10 commits into
mainfrom
feature/RED-77-roadmap-retarget

Conversation

@fs21co049adityawaghule
Copy link
Copy Markdown
Contributor

Summary

  • Implements one-pass due date retargeting for roadmap tasks
  • When parent roadmap start date changes, all child tasks shift by the delta
  • Uses database transaction for atomic updates
  • Supports options to retarget completed/blocked tasks

Changes

  • src/lib/roadmapRetarget.ts - Core retarget service with one-pass algorithm
  • src/app/api/roadmaps/[id]/route.ts - Added PATCH endpoint for date updates
  • tests/unit/lib/roadmapRetarget.test.ts - Unit tests for date calculations

Algorithm

  1. Fetch current roadmap start date
  2. Calculate delta (NEW - OLD)
  3. Fetch all child tasks ( RoadmapTask)
  4. Apply delta to each task's actual due date
  5. Batch update in single transaction

API Usage

```bash
PATCH /api/roadmaps/:id
{
"startDate": "2024-02-15T00:00:00Z",
"retargetCompletedTasks": false,
"retargetLockedTasks": false
}
```

Edge Cases Handled

  • Zero delta (no change) - returns early
  • Completed tasks - optionally skipped
  • Blocked/Skipped tasks - optionally skipped
  • Missing roadmap - returns error

Testing

  • All 450 unit tests pass
  • Lint passes

Linked Issue

RED-77

Aditya and others added 9 commits February 18, 2026 14:51
- Added workspaceId to all analytics functions (funnel.ts, validation.ts)
- All SQL queries now scoped by workspace_id
- Added date validation via resolveDateRange (returns 400 on invalid)
- Routes pass session.workspaceId to analytics functions
- Enforced ordered stage progression in funnel paths
- Resolved conflicts with origin/feature/LIN-55-comment-first-mode
- Kept ttfv functionality and dateRange tests
- Redesigned homepage with Problem → Workflow → Proof → CTA hierarchy
- Created modular components: HeroSection, ProblemSection, WorkflowSection, ProofSection, FeaturesSection, CTASection
- Added outcome-first headline: Find Viral Reddit Content in Minutes
- Added SEO metadata (title, description, openGraph)
- Included metrics and testimonials for social proof
@linear
Copy link
Copy Markdown

linear Bot commented Feb 28, 2026

RED-77 RED-64B: One-pass due-date retarget for RED-64 child tracks

After PM confirms launch date, retarget epic and all child due dates in one pass while preserving dependency order and critical path sequencing.

- Created PreCloseValidator service with validation logic
- Added validation API endpoint: GET /api/projects/[id]/validate-close
- Added close API endpoint: POST /api/projects/[id]/close
- Created PreCloseChecklist UI component for project settings
- Validates: tasks complete, roadmaps complete, no blocked tasks
- Supports force archive option for admins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants