π₯π₯π₯ 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-5050] feat: updated work item urls with issues. (#7871)
sriram veeraghanta992457efd2be
diff --git a/apps/api/plane/api/urls/__init__.py b/apps/api/plane/api/urls/__init__.pyindex ed187549d6..10cad2068e 100644--- a/apps/api/plane/api/urls/__init__.py+++ b/apps/api/plane/api/urls/__init__.py@@ -1,21 +1,23 @@-from .project import urlpatterns as project_patterns-from .state import urlpatterns as state_patterns-from .issue import urlpatterns as issue_patterns+from .asset import urlpatterns as asset_patternsfrom .cycle import urlpatterns as cycle_patterns-from .module import urlpatterns as module_patternsfrom .intake import urlpatterns as intake_patterns+from .label import urlpatterns as label_patternsfrom .member import urlpatterns as member_patterns-from .asset import urlpatterns as asset_patterns+from .module import urlpatterns as module_patterns+from .project import urlpatterns as project_patterns+from .state import urlpatterns as state_patternsfrom .user import urlpatterns as user_patterns+from .work_item import urlpatterns as work_item_patternsurlpatterns = [*asset_patterns,- *project_patterns,- *state_patterns,- *issue_patterns,*cycle_patterns,- *module_patterns,*intake_patterns,+ *label_patterns,*member_patterns,+ *module_patterns,+ *project_patterns,+ *state_patterns,*user_patterns,+ *work_item_patterns,]diff --git a/apps/api/plane/api/urls/label.py b/apps/api/plane/api/urls/label.pynew file mode 100644index 0000000000..f7ee57b171--- /dev/null+++ b/apps/api/plane/api/urls/label.py@@ -0,0 +1,17 @@+from django.urls import path++from plane.api.views import LabelListCreateAPIEndpoint, LabelDetailAPIEndpoint+++urlpatterns = [+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/labels/",+ LabelListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),+ name="label",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/labels/<uuid:pk>/",+ LabelDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),+ name="label",+ ),+]diff --git a/apps/api/plane/api/urls/issue.py b/apps/api/plane/api/urls/work_item.pysimilarity index 52%rename from apps/api/plane/api/urls/issue.pyrename to apps/api/plane/api/urls/work_item.pyindex 8306a13159..7207df9579 100644--- a/apps/api/plane/api/urls/issue.py+++ b/apps/api/plane/api/urls/work_item.py@@ -3,8 +3,6 @@ from django.urls import pathfrom plane.api.views import (IssueListCreateAPIEndpoint,IssueDetailAPIEndpoint,- LabelListCreateAPIEndpoint,- LabelDetailAPIEndpoint,IssueLinkListCreateAPIEndpoint,IssueLinkDetailAPIEndpoint,IssueCommentListCreateAPIEndpoint,@@ -17,7 +15,8 @@ from plane.api.views import (IssueSearchEndpoint,)-urlpatterns = [+# Deprecated url patterns+old_url_patterns = [path("workspaces/<str:slug>/issues/search/",IssueSearchEndpoint.as_view(http_method_names=["get"]),@@ -38,16 +37,6 @@ urlpatterns = [IssueDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),name="issue",),- path(- "workspaces/<str:slug>/projects/<uuid:project_id>/labels/",- LabelListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),- name="label",- ),- path(- "workspaces/<str:slug>/projects/<uuid:project_id>/labels/<uuid:pk>/",- LabelDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),- name="label",- ),path("workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/links/",IssueLinkListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),@@ -89,3 +78,69 @@ urlpatterns = [name="issue-attachment",),]++# New url patterns with work-items as the prefix+new_url_patterns = [+ path(+ "workspaces/<str:slug>/work-items/search/",+ IssueSearchEndpoint.as_view(http_method_names=["get"]),+ name="work-item-search",+ ),+ path(+ "workspaces/<str:slug>/work-items/<str:project_identifier>-<str:issue_identifier>/",+ WorkspaceIssueAPIEndpoint.as_view(http_method_names=["get"]),+ name="work-item-by-identifier",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/",+ IssueListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),+ name="work-item-list",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:pk>/",+ IssueDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),+ name="work-item-detail",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/links/",+ IssueLinkListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),+ name="work-item-link-list",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/links/<uuid:pk>/",+ IssueLinkDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),+ name="work-item-link-detail",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/comments/",+ IssueCommentListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),+ name="work-item-comment-list",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/comments/<uuid:pk>/",+ IssueCommentDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),+ name="work-item-comment-detail",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/activities/",+ IssueActivityListAPIEndpoint.as_view(http_method_names=["get"]),+ name="work-item-activity-list",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/activities/<uuid:pk>/",+ IssueActivityDetailAPIEndpoint.as_view(http_method_names=["get"]),+ name="work-item-activity-detail",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/attachments/",+ IssueAttachmentListCreateAPIEndpoint.as_view(http_method_names=["get", "post"]),+ name="work-item-attachment-list",+ ),+ path(+ "workspaces/<str:slug>/projects/<uuid:project_id>/work-items/<uuid:issue_id>/attachments/<uuid:pk>/",+ IssueAttachmentDetailAPIEndpoint.as_view(http_method_names=["get", "patch", "delete"]),+ name="work-item-attachment-detail",+ ),+]++urlpatterns = old_url_patterns + new_url_patterns