Code
Identity resolution

Every hour belongs to someone, or goes to review

Every worklog is attributed to a person by the first rule that matches. Rules 3 and 4 are educated guesses, so they only apply when the person's name is unique in the directory.

Ranked matching rules, with ambiguous cases sent for review

#RuleShare of hours
1Exact email (directory mail, UPN, alternate emails in the mapping file)85.9%
2The source's own ID (tracker key in the mapping file)2.2%
3Same name at the default domain (legacy and external domains)5.4%
4Swapped last.first login4.4%
—No unambiguous match: kept as Unknown, sent to the review worklist2.2%

The review loop

After the demo, the quality gate raises one warning: 2.2% of hours can't be attributed. The worklist says exactly why:

TIMESHEET APPromero.nicolas@…376 entries · 1,430 hoursSwapped login, and there are two Nicolas Romeros
ISSUE TRACKERTRK20002348 entries · 1,402 hoursContractor whose tracker account was deleted

A person confirms who the first one is and adds one line to the mapping file:

[email protected],,[email protected],0,,timesheet login is last.first - confirmed

On the next daily run all 376 entries are attributed by email and the warning clears. That loop, not a cleverer fuzzy match, is what keeps a report like this trustworthy.