Skip to content

PM-1526 Fix copilot requests sorting on title #1159

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 1 commit into from
Jul 30, 2025
Merged

PM-1526 Fix copilot requests sorting on title #1159

merged 1 commit into from
Jul 30, 2025

Conversation

himaniraghav3
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-1526

What's in this PR?

Fixes sort on title due to missing titles in some records

@himaniraghav3 himaniraghav3 requested a review from kkartunov July 29, 2025 10:00
// Handle undefined/null values safely
if (aField === undefined && bField === undefined) return 0
if (aField === undefined) return 1
if (bField === undefined) return -1
return sort.direction === 'asc'
? aField.localeCompare(bField)

Choose a reason for hiding this comment

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

Consider adding a check for null values in addition to undefined when comparing aField and bField. This ensures that both null and undefined are handled consistently, as the current implementation only checks for undefined. You might want to use aField == null and bField == null to cover both cases.

@kkartunov kkartunov merged commit 2639b6b into dev Jul 30, 2025
3 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