Advance issue status from repair actions
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user