diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index ae785578f..a6a03c16c 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -1086,8 +1086,6 @@ class IssueArchiveViewSet(BaseViewSet): archived_at__isnull=False, pk=pk, ) - issue.archived_at = None - issue.save() issue_activity.delay( type="issue.activity.updated", requested_data=json.dumps({"archived_at": None}), @@ -1099,6 +1097,8 @@ class IssueArchiveViewSet(BaseViewSet): ), epoch=int(timezone.now().timestamp()), ) + issue.archived_at = None + issue.save() return Response(IssueSerializer(issue).data, status=status.HTTP_200_OK) diff --git a/apiserver/plane/bgtasks/issue_automation_task.py b/apiserver/plane/bgtasks/issue_automation_task.py index b2f7476a5..4d77eb124 100644 --- a/apiserver/plane/bgtasks/issue_automation_task.py +++ b/apiserver/plane/bgtasks/issue_automation_task.py @@ -59,7 +59,7 @@ def archive_old_issues(): # Check if Issues if issues: # Set the archive time to current time - archive_at = timezone.now() + archive_at = timezone.now().date() issues_to_update = [] for issue in issues: