Add configurable default and parameter-based strategy selection for affiliation matching#526
Merged
Add configurable default and parameter-based strategy selection for affiliation matching#526
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
The purpose of this PR is to introduce a configurable default for the affiliation matching logic in the ROR API and allow users to explicitly choose between the
single_searchandmultisearchmatching methods via request parameters.Approach
The logic in
OrganizationViewSethas been updated to evaluate matching strategy based on a hierarchy:single_searchormultisearch).SINGLE_SEARCH_DEFAULT).Key Modifications
SINGLE_SEARCH_DEFAULTsetting, controlled by an environment variable (defaults toFalse).listmethod inOrganizationViewSetto check for matching parameters and the new configuration setting.AffiliationDefaultMatchingTestCaseto verify that the logic correctly identifies which matching function to call based on different settings and query parameters.Important Technical Details
multisearchparameter now acts as an explicit override to force the legacy matching logic even ifSINGLE_SEARCH_DEFAULTis enabled.SINGLE_SEARCH_DEFAULTis explicitly set toTrue.Types of changes
Reviewer, please remember our guidelines: