Advance issue status from repair actions
Magent CI/CD / verify (push) Successful in 10m30s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Canceled after 5s

This commit is contained in:
2026-09-01 14:48:08 +12:00
parent c7a56f2525
commit 16876e1cf0
2 changed files with 33 additions and 0 deletions
+13
View File
@@ -44,6 +44,7 @@ from ..db import (
get_artwork_cache_status_count,
get_setting,
set_setting,
update_portal_item,
update_artwork_cache_stats,
cleanup_history,
is_seerr_media_failure_suppressed,
@@ -1830,6 +1831,18 @@ def _record_replacement_activity(
) -> None:
if not issue:
return
current_status = str(issue.get("status") or "new").strip().lower()
next_status: Optional[str] = None
if event_type.endswith("_started"):
next_status = "in_progress"
elif event_type.endswith("_failed"):
next_status = "blocked"
if next_status and current_status not in {"done", "closed"}:
update_portal_item(
int(issue["id"]),
status=next_status,
issue_resolved_at=None,
)
add_portal_item_activity(
int(issue["id"]),
event_type=event_type,