-
Notifications
You must be signed in to change notification settings - Fork 6
Add preferred_name support to ALIndividual.familiar() method #972
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: nonprofittechy <[email protected]>
@copilot using existing test_feature.yml as a model, can you add a test_preferred_name.yml that goes through the iterations for an interactive confirmation of the behavior:
|
… functionality Co-authored-by: nonprofittechy <[email protected]>
I've created
The test allows manual verification of all the preferred name logic paths, including edge cases like business entities ignoring preferred names and conflict resolution when multiple people have similar names. Commit: 40eed61 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation tested and works as designed
Will slow down and figure out unit tests |
The
familiar()
method inALIndividual
now usespreferred_name.first
when available, providing better support for individuals who go by a name different from their legal first name.Changes Made
Updated
ALIndividual.familiar()
methodpreferred_name.first
and use it when available and non-emptyname.first
behavior whenpreferred_name
is not set, empty, or Nonename.first
as before (no behavior change)Implementation
Added comprehensive tests
Added interactive test file
test_preferred_name.yml
: Interactive docassemble test that includes assembly_line.yml and provides manual verification of preferred name functionality.familiar()
behavior for each test caseBehavior Examples
Backward Compatibility
This change is fully backward compatible. Existing code using
.familiar()
will continue to work exactly as before unlesspreferred_name
is explicitly set.Fixes #688.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.