Skip to content

PM-1314 Make grouping by status optional #842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2025
Merged

PM-1314 Make grouping by status optional #842

merged 3 commits into from
Jul 31, 2025

Conversation

himaniraghav3
Copy link
Collaborator

This makes the grouping optional so that we have grouped data on copilots portal and can opt for ungrouped data on community app

@himaniraghav3 himaniraghav3 requested a review from kkartunov July 31, 2025 12:10
@@ -21,6 +21,25 @@ module.exports = [
const pageSize = parseInt(req.query.pageSize, 10) || DEFAULT_PAGE_SIZE;
const offset = (page - 1) * pageSize;
const limit = pageSize;
const noGroupingByStatus = req.query.noGrouping === 'true';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming the variable noGroupingByStatus to something more intuitive, such as isGroupingByStatusDisabled, to clarify that it represents a boolean flag indicating whether grouping is disabled.

'ASC',
]);
}
baseOrder.push([sortParams[0], sortParams[1]]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that sortParams is properly validated before being used in baseOrder.push([sortParams[0], sortParams[1]]);. This will prevent potential runtime errors if sortParams is undefined or not an array with at least two elements.

@kkartunov kkartunov merged commit 8587a8e into develop Jul 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants