diff --git a/apiserver/plane/bgtasks/issue_automation_task.py b/apiserver/plane/bgtasks/issue_automation_task.py index d051b5118..bb2528863 100644 --- a/apiserver/plane/bgtasks/issue_automation_task.py +++ b/apiserver/plane/bgtasks/issue_automation_task.py @@ -49,6 +49,11 @@ def archive_old_issues(): Q(issue_module__module__target_date__lt=timezone.now().date()) & Q(issue_module__isnull=False) ), + ).filter( + Q(issue_inbox__status=1) + | Q(issue_inbox__status=-1) + | Q(issue_inbox__status=2) + | Q(issue_inbox__isnull=True) ) # Check if Issues @@ -111,6 +116,11 @@ def close_old_issues(): Q(issue_module__module__target_date__lt=timezone.now().date()) & Q(issue_module__isnull=False) ), + ).filter( + Q(issue_inbox__status=1) + | Q(issue_inbox__status=-1) + | Q(issue_inbox__status=2) + | Q(issue_inbox__isnull=True) ) # Check if Issues