forked from github/plane
remove: time line issues (#1316)
This commit is contained in:
parent
464c0f2308
commit
f797bb20f9
@ -31,7 +31,6 @@ from .issue import (
|
|||||||
IssueCreateSerializer,
|
IssueCreateSerializer,
|
||||||
IssueActivitySerializer,
|
IssueActivitySerializer,
|
||||||
IssueCommentSerializer,
|
IssueCommentSerializer,
|
||||||
TimeLineIssueSerializer,
|
|
||||||
IssuePropertySerializer,
|
IssuePropertySerializer,
|
||||||
BlockerIssueSerializer,
|
BlockerIssueSerializer,
|
||||||
BlockedIssueSerializer,
|
BlockedIssueSerializer,
|
||||||
|
@ -16,7 +16,6 @@ from plane.db.models import (
|
|||||||
Issue,
|
Issue,
|
||||||
IssueActivity,
|
IssueActivity,
|
||||||
IssueComment,
|
IssueComment,
|
||||||
TimelineIssue,
|
|
||||||
IssueProperty,
|
IssueProperty,
|
||||||
IssueBlocker,
|
IssueBlocker,
|
||||||
IssueAssignee,
|
IssueAssignee,
|
||||||
@ -288,21 +287,6 @@ class IssueCommentSerializer(BaseSerializer):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class TimeLineIssueSerializer(BaseSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = TimelineIssue
|
|
||||||
fields = "__all__"
|
|
||||||
read_only_fields = [
|
|
||||||
"workspace",
|
|
||||||
"project",
|
|
||||||
"issue",
|
|
||||||
"created_by",
|
|
||||||
"updated_by",
|
|
||||||
"created_at",
|
|
||||||
"updated_at",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class IssuePropertySerializer(BaseSerializer):
|
class IssuePropertySerializer(BaseSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = IssueProperty
|
model = IssueProperty
|
||||||
|
@ -70,7 +70,6 @@ from plane.api.views import (
|
|||||||
BulkDeleteIssuesEndpoint,
|
BulkDeleteIssuesEndpoint,
|
||||||
BulkImportIssuesEndpoint,
|
BulkImportIssuesEndpoint,
|
||||||
ProjectUserViewsEndpoint,
|
ProjectUserViewsEndpoint,
|
||||||
TimeLineIssueViewSet,
|
|
||||||
IssuePropertyViewSet,
|
IssuePropertyViewSet,
|
||||||
LabelViewSet,
|
LabelViewSet,
|
||||||
SubIssuesEndpoint,
|
SubIssuesEndpoint,
|
||||||
@ -826,30 +825,6 @@ urlpatterns = [
|
|||||||
name="project-issue-comment",
|
name="project-issue-comment",
|
||||||
),
|
),
|
||||||
## End IssueComments
|
## End IssueComments
|
||||||
## Roadmap
|
|
||||||
path(
|
|
||||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/roadmaps/",
|
|
||||||
TimeLineIssueViewSet.as_view(
|
|
||||||
{
|
|
||||||
"get": "list",
|
|
||||||
"post": "create",
|
|
||||||
}
|
|
||||||
),
|
|
||||||
name="project-issue-roadmap",
|
|
||||||
),
|
|
||||||
path(
|
|
||||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/roadmaps/<uuid:pk>/",
|
|
||||||
TimeLineIssueViewSet.as_view(
|
|
||||||
{
|
|
||||||
"get": "retrieve",
|
|
||||||
"put": "update",
|
|
||||||
"patch": "partial_update",
|
|
||||||
"delete": "destroy",
|
|
||||||
}
|
|
||||||
),
|
|
||||||
name="project-issue-roadmap",
|
|
||||||
),
|
|
||||||
## End Roadmap
|
|
||||||
## IssueProperty
|
## IssueProperty
|
||||||
path(
|
path(
|
||||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issue-properties/",
|
"workspaces/<str:slug>/projects/<uuid:project_id>/issue-properties/",
|
||||||
|
@ -58,7 +58,6 @@ from .issue import (
|
|||||||
WorkSpaceIssuesEndpoint,
|
WorkSpaceIssuesEndpoint,
|
||||||
IssueActivityEndpoint,
|
IssueActivityEndpoint,
|
||||||
IssueCommentViewSet,
|
IssueCommentViewSet,
|
||||||
TimeLineIssueViewSet,
|
|
||||||
IssuePropertyViewSet,
|
IssuePropertyViewSet,
|
||||||
LabelViewSet,
|
LabelViewSet,
|
||||||
BulkDeleteIssuesEndpoint,
|
BulkDeleteIssuesEndpoint,
|
||||||
|
@ -34,7 +34,6 @@ from plane.api.serializers import (
|
|||||||
IssueCreateSerializer,
|
IssueCreateSerializer,
|
||||||
IssueActivitySerializer,
|
IssueActivitySerializer,
|
||||||
IssueCommentSerializer,
|
IssueCommentSerializer,
|
||||||
TimeLineIssueSerializer,
|
|
||||||
IssuePropertySerializer,
|
IssuePropertySerializer,
|
||||||
LabelSerializer,
|
LabelSerializer,
|
||||||
IssueSerializer,
|
IssueSerializer,
|
||||||
@ -54,7 +53,6 @@ from plane.db.models import (
|
|||||||
Issue,
|
Issue,
|
||||||
IssueActivity,
|
IssueActivity,
|
||||||
IssueComment,
|
IssueComment,
|
||||||
TimelineIssue,
|
|
||||||
IssueProperty,
|
IssueProperty,
|
||||||
Label,
|
Label,
|
||||||
IssueLink,
|
IssueLink,
|
||||||
@ -443,39 +441,6 @@ class IssueCommentViewSet(BaseViewSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class TimeLineIssueViewSet(BaseViewSet):
|
|
||||||
serializer_class = TimeLineIssueSerializer
|
|
||||||
model = TimelineIssue
|
|
||||||
permission_classes = [
|
|
||||||
ProjectEntityPermission,
|
|
||||||
]
|
|
||||||
|
|
||||||
filterset_fields = [
|
|
||||||
"issue__id",
|
|
||||||
"workspace__id",
|
|
||||||
]
|
|
||||||
|
|
||||||
def perform_create(self, serializer):
|
|
||||||
serializer.save(
|
|
||||||
project_id=self.kwargs.get("project_id"),
|
|
||||||
issue_id=self.kwargs.get("issue_id"),
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
return self.filter_queryset(
|
|
||||||
super()
|
|
||||||
.get_queryset()
|
|
||||||
.filter(workspace__slug=self.kwargs.get("slug"))
|
|
||||||
.filter(project_id=self.kwargs.get("project_id"))
|
|
||||||
.filter(issue_id=self.kwargs.get("issue_id"))
|
|
||||||
.filter(project__project_projectmember__member=self.request.user)
|
|
||||||
.select_related("project")
|
|
||||||
.select_related("workspace")
|
|
||||||
.select_related("issue")
|
|
||||||
.distinct()
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class IssuePropertyViewSet(BaseViewSet):
|
class IssuePropertyViewSet(BaseViewSet):
|
||||||
serializer_class = IssuePropertySerializer
|
serializer_class = IssuePropertySerializer
|
||||||
model = IssueProperty
|
model = IssueProperty
|
||||||
|
@ -23,7 +23,6 @@ from .project import (
|
|||||||
from .issue import (
|
from .issue import (
|
||||||
Issue,
|
Issue,
|
||||||
IssueActivity,
|
IssueActivity,
|
||||||
TimelineIssue,
|
|
||||||
IssueProperty,
|
IssueProperty,
|
||||||
IssueComment,
|
IssueComment,
|
||||||
IssueBlocker,
|
IssueBlocker,
|
||||||
|
@ -293,24 +293,6 @@ class IssueActivity(ProjectBaseModel):
|
|||||||
return str(self.issue)
|
return str(self.issue)
|
||||||
|
|
||||||
|
|
||||||
class TimelineIssue(ProjectBaseModel):
|
|
||||||
issue = models.ForeignKey(
|
|
||||||
Issue, on_delete=models.CASCADE, related_name="issue_timeline"
|
|
||||||
)
|
|
||||||
sequence_id = models.FloatField(default=1.0)
|
|
||||||
links = models.JSONField(default=dict, blank=True)
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
verbose_name = "Timeline Issue"
|
|
||||||
verbose_name_plural = "Timeline Issues"
|
|
||||||
db_table = "issue_timelines"
|
|
||||||
ordering = ("-created_at",)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
"""Return project of the project member"""
|
|
||||||
return str(self.issue)
|
|
||||||
|
|
||||||
|
|
||||||
class IssueComment(ProjectBaseModel):
|
class IssueComment(ProjectBaseModel):
|
||||||
comment_stripped = models.TextField(verbose_name="Comment", blank=True)
|
comment_stripped = models.TextField(verbose_name="Comment", blank=True)
|
||||||
comment_json = models.JSONField(blank=True, default=dict)
|
comment_json = models.JSONField(blank=True, default=dict)
|
||||||
|
Loading…
Reference in New Issue
Block a user