Extend order_by_fiels for user stories and issues
Add order_by_fields to tasks and milestonesremotes/origin/uuid-for-analytics
parent
42d88124bc
commit
abaa6ddcb3
|
@ -67,6 +67,7 @@ class IssueViewSet(OCCResourceMixin, VotedResourceMixin, HistoryResourceMixin, W
|
||||||
"project__slug",
|
"project__slug",
|
||||||
"status__is_closed")
|
"status__is_closed")
|
||||||
order_by_fields = ("type",
|
order_by_fields = ("type",
|
||||||
|
"project",
|
||||||
"status",
|
"status",
|
||||||
"severity",
|
"severity",
|
||||||
"priority",
|
"priority",
|
||||||
|
|
|
@ -58,6 +58,12 @@ class MilestoneViewSet(HistoryResourceMixin, WatchedResourceMixin,
|
||||||
"project__slug",
|
"project__slug",
|
||||||
"closed"
|
"closed"
|
||||||
)
|
)
|
||||||
|
order_by_fields = ("project",
|
||||||
|
"name",
|
||||||
|
"estimated_start",
|
||||||
|
"estimated_finish",
|
||||||
|
"closed",
|
||||||
|
"created_date")
|
||||||
queryset = models.Milestone.objects.all()
|
queryset = models.Milestone.objects.all()
|
||||||
|
|
||||||
def create(self, request, *args, **kwargs):
|
def create(self, request, *args, **kwargs):
|
||||||
|
|
|
@ -67,6 +67,14 @@ class TaskViewSet(OCCResourceMixin, VotedResourceMixin, HistoryResourceMixin, Wa
|
||||||
"project",
|
"project",
|
||||||
"project__slug",
|
"project__slug",
|
||||||
"status__is_closed"]
|
"status__is_closed"]
|
||||||
|
order_by_fields = ("project",
|
||||||
|
"milestone",
|
||||||
|
"status",
|
||||||
|
"created_date",
|
||||||
|
"modified_date",
|
||||||
|
"assigned_to",
|
||||||
|
"subject",
|
||||||
|
"total_voters")
|
||||||
|
|
||||||
def get_serializer_class(self, *args, **kwargs):
|
def get_serializer_class(self, *args, **kwargs):
|
||||||
if self.action in ["retrieve", "by_ref"]:
|
if self.action in ["retrieve", "by_ref"]:
|
||||||
|
|
|
@ -85,6 +85,13 @@ class UserStoryViewSet(OCCResourceMixin, VotedResourceMixin, HistoryResourceMixi
|
||||||
"sprint_order",
|
"sprint_order",
|
||||||
"kanban_order",
|
"kanban_order",
|
||||||
"epic_order",
|
"epic_order",
|
||||||
|
"project",
|
||||||
|
"milestone",
|
||||||
|
"status",
|
||||||
|
"created_date",
|
||||||
|
"modified_date",
|
||||||
|
"assigned_to",
|
||||||
|
"subject",
|
||||||
"total_voters"]
|
"total_voters"]
|
||||||
|
|
||||||
def get_serializer_class(self, *args, **kwargs):
|
def get_serializer_class(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue