Repository navigation
feat(people): match manager references by employee number, email or login - #10694
Draft
mzxchandra wants to merge 2 commits into
Draft
mzxchandra wants to merge 2 commits into
mzxchandra wants to merge 2 commits into
Conversation
…ogin Directories fed by an HR system often fill Okta's managerId with an employee number, email or username instead of the manager's Okta ID. Publish dropped those references, so a fully synced directory could show no reporting lines at all. Publish now matches each manager reference in order: account ID, then employee number (Okta employeeNumber, Entra employeeId, SCIM enterprise employeeNumber), then email, then login, case-insensitively for the last two. The first key with a match decides. A reference several accounts share at that key is left unlinked with a manager_ambiguous warning; one that names nobody, such as a departed manager, is dropped silently as before. References that already equal an account ID skip the matching entirely, so ID-linked directories do no extra work. Each publish logs how many references each key matched. Schema: nullable people_directory_stage.employee_number and people_directory_issue.reference; no backfill.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…mployee-number case
Contributor
Author
Contributor
Author
|
@cubic-dev-ai review this PR |
Contributor
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
Contributor
Author
This branch was previously deployed
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.
Summary
managerIdwith an employee number, email or username, and publish used to drop those silently, leaving the org chart with no reporting linesemployeeNumber, EntraemployeeIdand SCIM enterpriseemployeeNumber. An over-length SCIM value is left out, never truncatedmanager_ambiguouswarning (Changed, CSV) carrying the reference. A reference that names nobody, such as a departed manager, is still dropped without a warningpeople_directory_stage.employee_numberandpeople_directory_issue.reference. Expansion only, no backfill; the old release never names either columnType of Change
Testing
bun run test:integrationonissues,snapshot,stageandlarge-directorypeople-sync suites: 36 passedemployeeNumberlinkpublishes a 12,000-person reporting chainruns in 15s locallybun run --cwd apps/sim test lib/people,bun run lint,bun run generate,bun run check:audits,bun run check:migrations origin/staging, drizzle-kit generate reports no driftChecklist
test-auditauthoring gate)