fix(tests): pause reopen timer, lock edits to assignee, restore Jira operator on reopen
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
- reopen_red_review starts the timer paused (paused_at set) instead of immediately running, since the operator hasn't resumed working yet — blue already did this via blue_work_started_at, red needed the same behavior via the existing pause/resume mechanism. - update_test_red/update_test_blue now lock edits to the actual assigned operator for leads too, not just techs — a lead could previously edit another operator's in-progress test. Mirrored in TeamTabs.tsx. - push_test_event reassigns the Jira ticket to the original operator (not the reopening lead) when a test returns to red_executing or blue_evaluating for rework, instead of leaving it on the lead.
This commit is contained in:
@@ -672,11 +672,13 @@ def update_test_red(
|
||||
Returns:
|
||||
TestOut: The updated test with refreshed red-team field values.
|
||||
"""
|
||||
# Assignee lock: red_tech cannot work a test assigned to someone else
|
||||
# Assignee lock: only the operator actually assigned to this test may
|
||||
# edit it — applies to red_lead too, not just red_tech, since a lead
|
||||
# editing another operator's in-progress test is exactly as wrong as
|
||||
# a different tech doing it.
|
||||
_pre_test = crud_get_test_or_raise(db, test_id)
|
||||
if (
|
||||
_pre_test.red_tech_assignee is not None
|
||||
and current_user.role == "red_tech"
|
||||
and _pre_test.red_tech_assignee != current_user.id
|
||||
):
|
||||
raise HTTPException(status_code=403, detail="Test is assigned to another operator")
|
||||
@@ -738,11 +740,11 @@ def update_test_blue(
|
||||
Returns:
|
||||
TestOut: The updated test with refreshed blue-team field values.
|
||||
"""
|
||||
# Assignee lock: blue_tech cannot work a test assigned to someone else
|
||||
# Assignee lock: only the operator actually assigned to this test may
|
||||
# edit it — applies to blue_lead too, not just blue_tech.
|
||||
_pre_test = crud_get_test_or_raise(db, test_id)
|
||||
if (
|
||||
_pre_test.blue_tech_assignee is not None
|
||||
and current_user.role == "blue_tech"
|
||||
and _pre_test.blue_tech_assignee != current_user.id
|
||||
):
|
||||
raise HTTPException(status_code=403, detail="Test is assigned to another operator")
|
||||
|
||||
Reference in New Issue
Block a user