Fix Participants::Query
filtering on training_status
#2005
+26
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira-3803
Context
When filtering participants on
training_status
we were still returning allapplications
in the resulting relationship of eachUser
. To be consistent with ECF we want to only return the applications that match thetraining_status
we are filtering to.Changes proposed in this pull request
Participants::Query
filtering ontraining_status
Fix filtering by
training_status
to only return matching applications in the resulting participants.Add test to verify that filtering by
from_participant_id
behaves in the same way; we only want participant id changes that match the filter to be in the results.