feat(phase-36): automatic Tempo time tracking via workflow buttons + fix campaign test management
- Add red_started_at/blue_started_at timing fields to Test model with Alembic migration - Modify workflow transitions to auto-create integrity-hashed worklogs: Start Execution records red_started_at, Submit to Blue Team stops Red timer and creates worklog then starts Blue timer, Submit for Review stops Blue timer and creates worklog - Auto-sync worklogs to Tempo when test has a Jira link - Add LiveTimer component showing real-time elapsed counter during active phases - Clear timing fields on test reopen - Fix campaign test management: replace broken navigate-to-tests flow with AddTestToCampaignModal that lets users search and add existing tests directly from the campaign detail page
This commit is contained in:
32
backend/alembic/versions/b021_add_phase_timing_fields.py
Normal file
32
backend/alembic/versions/b021_add_phase_timing_fields.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""add_phase_timing_fields
|
||||
|
||||
Revision ID: b021phasetiming
|
||||
Revises: b020jiraworklogs
|
||||
Create Date: 2026-02-17 18:00:00.000000
|
||||
|
||||
Add red_started_at and blue_started_at columns to the tests table
|
||||
so that automatic worklogs can record real elapsed time per phase.
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision = "b021phasetiming"
|
||||
down_revision = "b020jiraworklogs"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute("""
|
||||
ALTER TABLE tests
|
||||
ADD COLUMN IF NOT EXISTS red_started_at TIMESTAMP,
|
||||
ADD COLUMN IF NOT EXISTS blue_started_at TIMESTAMP;
|
||||
""")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.execute("""
|
||||
ALTER TABLE tests
|
||||
DROP COLUMN IF EXISTS red_started_at,
|
||||
DROP COLUMN IF EXISTS blue_started_at;
|
||||
""")
|
||||
Reference in New Issue
Block a user