From 4f09a89f5e29d4fe094a017dac1a601c28970434 Mon Sep 17 00:00:00 2001 From: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:11:40 +0530 Subject: [PATCH] chore: unarchived issue and date format changes (#2598) * chore: unarchived issue message corrected * chore: passing the date in archived at --- apiserver/plane/api/views/issue.py | 4 ++-- apiserver/plane/bgtasks/issue_automation_task.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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: