remove: time line issues (#1316)

This commit is contained in:
pablohashescobar 2023-06-20 10:26:31 +05:30 committed by GitHub
parent 464c0f2308
commit f797bb20f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 97 deletions

View File

@ -31,7 +31,6 @@ from .issue import (
IssueCreateSerializer, IssueCreateSerializer,
IssueActivitySerializer, IssueActivitySerializer,
IssueCommentSerializer, IssueCommentSerializer,
TimeLineIssueSerializer,
IssuePropertySerializer, IssuePropertySerializer,
BlockerIssueSerializer, BlockerIssueSerializer,
BlockedIssueSerializer, BlockedIssueSerializer,

View File

@ -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

View File

@ -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/",

View File

@ -58,7 +58,6 @@ from .issue import (
WorkSpaceIssuesEndpoint, WorkSpaceIssuesEndpoint,
IssueActivityEndpoint, IssueActivityEndpoint,
IssueCommentViewSet, IssueCommentViewSet,
TimeLineIssueViewSet,
IssuePropertyViewSet, IssuePropertyViewSet,
LabelViewSet, LabelViewSet,
BulkDeleteIssuesEndpoint, BulkDeleteIssuesEndpoint,

View File

@ -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

View File

@ -23,7 +23,6 @@ from .project import (
from .issue import ( from .issue import (
Issue, Issue,
IssueActivity, IssueActivity,
TimelineIssue,
IssueProperty, IssueProperty,
IssueComment, IssueComment,
IssueBlocker, IssueBlocker,

View File

@ -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)