mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
dev: state__group pagination
This commit is contained in:
parent
ffeb77ec86
commit
144d47fdec
@ -131,6 +131,7 @@ def issue_on_results(issues, group_by):
|
||||
"link_count",
|
||||
"is_draft",
|
||||
"archived_at",
|
||||
"state__group",
|
||||
]
|
||||
if group_by == "assignees__id":
|
||||
required_fields.extend(["label_ids", "module_ids", "assignees__id"])
|
||||
@ -191,5 +192,19 @@ def issue_group_values(field, slug, project_id=None):
|
||||
else:
|
||||
return list(queryset) + ["None"]
|
||||
if field == "priority":
|
||||
return ["low", "medium", "high", "urgent", "none"]
|
||||
return [
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
"urgent",
|
||||
"none",
|
||||
]
|
||||
if field == "state__group":
|
||||
return [
|
||||
"backlog",
|
||||
"unstarted",
|
||||
"started",
|
||||
"completed",
|
||||
"cancelled",
|
||||
]
|
||||
return []
|
||||
|
@ -325,6 +325,7 @@ class GroupedOffsetPaginator(OffsetPaginator):
|
||||
|
||||
def __query_grouper(self, results):
|
||||
processed_results = self.__get_field_dict()
|
||||
print(results)
|
||||
for result in results:
|
||||
group_value = str(result.get(self.group_by_field_name))
|
||||
if group_value in processed_results:
|
||||
|
Loading…
Reference in New Issue
Block a user