π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-3786] fix: issue date update when converting when dates are passed as string for comparison #6880
Nikhil543552f492b4
diff --git a/apiserver/plane/app/views/issue/base.py b/apiserver/plane/app/views/issue/base.pyindex 7a6d6045dd..2a7e9d0217 100644--- a/apiserver/plane/app/views/issue/base.py+++ b/apiserver/plane/app/views/issue/base.py@@ -63,6 +63,7 @@ from plane.bgtasks.webhook_task import model_activityfrom plane.bgtasks.issue_description_version_task import issue_description_version_taskfrom plane.utils.host import base_host+class IssueListEndpoint(BaseAPIView):@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])def get(self, request, slug, project_id):@@ -1034,9 +1035,17 @@ class IssueBulkUpdateDateEndpoint(BaseAPIView):"""Validate that start date is before target date."""+ from datetime import datetime+start = new_start or current_starttarget = new_target or current_target+ # Convert string dates to datetime objects if they're strings+ if isinstance(start, str):+ start = datetime.strptime(start, "%Y-%m-%d").date()+ if isinstance(target, str):+ target = datetime.strptime(target, "%Y-%m-%d").date()+if start and target and start > target:return Falsereturn True