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",
|
||||
"status__is_closed")
|
||||
order_by_fields = ("type",
|
||||
"project",
|
||||
"status",
|
||||
"severity",
|
||||
"priority",
|
||||
|
|
|
@ -58,6 +58,12 @@ class MilestoneViewSet(HistoryResourceMixin, WatchedResourceMixin,
|
|||
"project__slug",
|
||||
"closed"
|
||||
)
|
||||
order_by_fields = ("project",
|
||||
"name",
|
||||
"estimated_start",
|
||||
"estimated_finish",
|
||||
"closed",
|
||||
"created_date")
|
||||
queryset = models.Milestone.objects.all()
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
|
|
|
@ -67,6 +67,14 @@ class TaskViewSet(OCCResourceMixin, VotedResourceMixin, HistoryResourceMixin, Wa
|
|||
"project",
|
||||
"project__slug",
|
||||
"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):
|
||||
if self.action in ["retrieve", "by_ref"]:
|
||||
|
|
|
@ -85,6 +85,13 @@ class UserStoryViewSet(OCCResourceMixin, VotedResourceMixin, HistoryResourceMixi
|
|||
"sprint_order",
|
||||
"kanban_order",
|
||||
"epic_order",
|
||||
"project",
|
||||
"milestone",
|
||||
"status",
|
||||
"created_date",
|
||||
"modified_date",
|
||||
"assigned_to",
|
||||
"subject",
|
||||
"total_voters"]
|
||||
|
||||
def get_serializer_class(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue