Feature/project status lifecycle #94
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Project Status Lifecycle & Rollback Workflow
Description
This PR implements the complete lifecycle management for transforming Applications into Projects. It introduces a strict state machine that handles the approval process, the official start of execution, and a destructive rollback mechanism, ensuring data integrity across the transition states.
Lifecycle & Workflow Changes
1. Status Architecture
in_review,project_in_progress) for all logic checks, decoupling business rules from database IDs.2. Approval & Ownership
uuidCreator), which is the Professor who performed the approval.3. Execution Phase (Start)
ApprovedtoIn Progress.4. Rollback Mechanism
In Review.API Response Updates
To support the UI in rendering these states correctly, several endpoints have been standardized:
List Views
The following endpoints now return the status as a structured object
status: { name, slug }:GET /application/my-applicationsGET /project/my-projectsGET /project/allApplication Details (
GET /application/:uuid)status: { name, slug }.project(UUID) to allow redirection to the project view if it exists.Project Details (
GET /project/:uuid)Now provides expanded context for the project lifecycle:
projectTypes: { id, name, minEstimatedMonths, maxEstimatedMonths, requiredHours }[]uuidCreator(The Professor who approved the app).createdAt: The date the original Application was created.approvedAt: The date the Project was created/approved.Infrastructure
uuidCreatorschema support and migrations.Important