forked from github/plane
chore: add cycle id and module id in issues list endpoint (#586)
This commit is contained in:
parent
d7ed237f78
commit
7eaec16381
@ -486,6 +486,8 @@ class IssueLiteSerializer(BaseSerializer):
|
|||||||
label_details = LabelLiteSerializer(read_only=True, source="labels", many=True)
|
label_details = LabelLiteSerializer(read_only=True, source="labels", many=True)
|
||||||
assignee_details = UserLiteSerializer(read_only=True, source="assignees", many=True)
|
assignee_details = UserLiteSerializer(read_only=True, source="assignees", many=True)
|
||||||
sub_issues_count = serializers.IntegerField(read_only=True)
|
sub_issues_count = serializers.IntegerField(read_only=True)
|
||||||
|
cycle_id = serializers.UUIDField(read_only=True)
|
||||||
|
module_id = serializers.UUIDField(read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Issue
|
model = Issue
|
||||||
|
@ -150,6 +150,8 @@ class IssueViewSet(BaseViewSet):
|
|||||||
self.get_queryset()
|
self.get_queryset()
|
||||||
.order_by(request.GET.get("order_by", "created_at"))
|
.order_by(request.GET.get("order_by", "created_at"))
|
||||||
.filter(**filters)
|
.filter(**filters)
|
||||||
|
.annotate(cycle_id=F("issue_cycle__id"))
|
||||||
|
.annotate(module_id=F("issue_module__id"))
|
||||||
)
|
)
|
||||||
|
|
||||||
issue_queryset = (
|
issue_queryset = (
|
||||||
|
Loading…
Reference in New Issue
Block a user