Skip to content

Commit

Permalink
Merge pull request #231 from makeplane/feat/issue_manual_ordering
Browse files Browse the repository at this point in the history
feat: manual ordering for issues in kanban
  • Loading branch information
pablohashescobar authored Feb 6, 2023
2 parents c7ad9f3 + c4fff45 commit 2c4dbc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
12 changes: 1 addition & 11 deletions apiserver/plane/api/serializers/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ class Meta:
"start_date",
"target_date",
"sequence_id",
"sort_order",
]


# Issue Serializer with state details
class IssueStateSerializer(BaseSerializer):

state_detail = StateSerializer(read_only=True, source="state")
project_detail = ProjectSerializer(read_only=True, source="project")

Expand All @@ -57,7 +57,6 @@ class Meta:
##TODO: Find a better way to write this serializer
## Find a better approach to save manytomany?
class IssueCreateSerializer(BaseSerializer):

state_detail = StateSerializer(read_only=True, source="state")
created_by_detail = UserLiteSerializer(read_only=True, source="created_by")
project_detail = ProjectSerializer(read_only=True, source="project")
Expand Down Expand Up @@ -176,7 +175,6 @@ def create(self, validated_data):
return issue

def update(self, instance, validated_data):

blockers = validated_data.pop("blockers_list", None)
assignees = validated_data.pop("assignees_list", None)
labels = validated_data.pop("labels_list", None)
Expand Down Expand Up @@ -254,7 +252,6 @@ def update(self, instance, validated_data):


class IssueActivitySerializer(BaseSerializer):

actor_detail = UserLiteSerializer(read_only=True, source="actor")

class Meta:
Expand All @@ -263,7 +260,6 @@ class Meta:


class IssueCommentSerializer(BaseSerializer):

actor_detail = UserLiteSerializer(read_only=True, source="actor")
issue_detail = IssueFlatSerializer(read_only=True, source="issue")
project_detail = ProjectSerializer(read_only=True, source="project")
Expand Down Expand Up @@ -319,7 +315,6 @@ class Meta:


class IssueLabelSerializer(BaseSerializer):

# label_details = LabelSerializer(read_only=True, source="label")

class Meta:
Expand All @@ -332,7 +327,6 @@ class Meta:


class BlockedIssueSerializer(BaseSerializer):

blocked_issue_detail = IssueFlatSerializer(source="block", read_only=True)

class Meta:
Expand All @@ -341,7 +335,6 @@ class Meta:


class BlockerIssueSerializer(BaseSerializer):

blocker_issue_detail = IssueFlatSerializer(source="blocked_by", read_only=True)

class Meta:
Expand All @@ -350,7 +343,6 @@ class Meta:


class IssueAssigneeSerializer(BaseSerializer):

assignee_details = UserLiteSerializer(read_only=True, source="assignee")

class Meta:
Expand All @@ -373,7 +365,6 @@ class Meta:


class IssueCycleDetailSerializer(BaseSerializer):

cycle_detail = CycleBaseSerializer(read_only=True, source="cycle")

class Meta:
Expand Down Expand Up @@ -404,7 +395,6 @@ class Meta:


class IssueModuleDetailSerializer(BaseSerializer):

module_detail = ModuleBaseSerializer(read_only=True, source="module")

class Meta:
Expand Down
1 change: 1 addition & 0 deletions apiserver/plane/db/models/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Issue(ProjectBaseModel):
labels = models.ManyToManyField(
"db.Label", blank=True, related_name="labels", through="IssueLabel"
)
sort_order = models.FloatField(default=65535)

class Meta:
verbose_name = "Issue"
Expand Down

0 comments on commit 2c4dbc8

Please sign in to comment.