bb-plane-fork/apiserver/plane/app/serializers
Nikhil b8043f92b1
[WEB-4373]: optimize backend query for workspace views and Project gantt view (#7267)
* feat: add IssueListDetailSerializer for detailed issue representation

- Introduced IssueListDetailSerializer to enhance issue data representation with expanded fields.
- Updated issue detail endpoint to utilize the new serializer for improved data handling.
- Added methods for retrieving related module, label, and assignee IDs, along with support for expanded relations.

* feat: add ViewIssueListSerializer and enhance issue ordering

- Introduced ViewIssueListSerializer for improved issue representation, including assignee, label, and module IDs.
- Updated WorkspaceViewIssuesViewSet to utilize the new serializer and optimized queryset with prefetching.
- Enhanced order_issue_queryset to maintain consistent ordering by created_at alongside other fields.
- Modified pagination logic to support total count retrieval for better performance.

* fix: optimize issue filtering and pagination logic

- Updated WorkspaceViewIssuesViewSet to apply filters more efficiently in the issue query.
- Refined pagination logic in OffsetPaginator to ensure consistent behavior using limit instead of cursor.value, improving overall pagination accuracy.

* fix: improve pagination logic in OffsetPaginator

- Updated the next_cursor calculation to use the length of results instead of cursor.value, ensuring accurate pagination behavior.
- Added a comment to clarify the purpose of checking for additional results after the current page.

* Move the common permission filters into a separate method

* fix: handle deleted related issues in serializers

- Updated IssueListDetailSerializer to skip null related issues when building relations.
- Enhanced ViewIssueListSerializer to safely access state.group, returning None if state is not present.
- Removed unused User import in base.py for cleaner code.

---------

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
2025-06-25 19:10:24 +05:30
..
__init__.py [WEB-4373]: optimize backend query for workspace views and Project gantt view (#7267) 2025-06-25 19:10:24 +05:30
analytic.py chore: formatting changes 2024-11-21 17:42:44 +05:30
api.py [WEB-3918] fix: api tokens is_active (#6941) 2025-04-24 01:28:29 +05:30
asset.py chore: formatting changes 2024-11-21 17:42:44 +05:30
base.py chore: formatting changes 2024-11-21 17:42:44 +05:30
cycle.py [WEB-3877] chore: changed the logic to end cycle (#6971) 2025-04-29 14:00:54 +05:30
draft.py chore: formatting changes 2024-11-21 17:42:44 +05:30
estimate.py chore: formatting changes 2024-11-21 17:42:44 +05:30
exporter.py chore: formatting changes 2024-11-21 17:42:44 +05:30
favorite.py fix: ruff file formatting based on config file pyproject (#7082) 2025-05-19 17:34:46 +05:30
importer.py chore: formatting changes 2024-11-21 17:42:44 +05:30
intake.py chore: formatting changes 2024-11-21 17:42:44 +05:30
issue.py [WEB-4373]: optimize backend query for workspace views and Project gantt view (#7267) 2025-06-25 19:10:24 +05:30
module.py chore: formatting changes 2024-11-21 17:42:44 +05:30
notification.py chore: formatting changes 2024-11-21 17:42:44 +05:30
page.py [PE-97] refactor: pages actions (#6234) 2024-12-31 12:54:09 +05:30
project.py [WEB-3964] refactor: permission layer (#7094) 2025-05-30 19:57:07 +05:30
state.py [WEB-3751] chore: work item state icon improvement (#6960) 2025-04-29 14:33:53 +05:30
user.py [WEB-3998] feat: settings page revamp (#6959) 2025-05-30 18:47:33 +05:30
view.py [WEB-4373]: optimize backend query for workspace views and Project gantt view (#7267) 2025-06-25 19:10:24 +05:30
webhook.py chore: create unique constraints for webhook (#6257) 2024-12-24 21:00:50 +05:30
workspace.py [WEB-4340] fix: duplicate assignees in user recents (#7216) 2025-06-18 15:14:21 +05:30