Skip to content
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

[CPDLP-3608] Fix bug with duplicate records in NPQ #1777

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mooktakim
Copy link
Contributor

Context

Ticket: https://dfedigital.atlassian.net.mcas.ms/browse/CPDLP-3608

Changes proposed in this pull request

  • Participants::Query now by default sorts by created_at
    • Adding applications.accepted_at to sorting forces query to return multiple User records as it has to join Application
  • Added distinct to the query
  • Added test to replicate the bug

Copy link

github-actions bot commented Oct 3, 2024

Copy link

sonarcloud bot commented Oct 3, 2024

@@ -60,11 +60,12 @@ def where_from_participant_id_is(from_participant_id)
end

def order_by
sort_order(sort:, model: User, default: { accepted_at: :asc })
sort_order(sort:, model: User, default: { created_at: :asc })
Copy link
Contributor

Choose a reason for hiding this comment

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

On the sorting order.. this change rolls back the one made here? https://dfedigital.atlassian.net/browse/CPDLP-3349

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