Skip to content

Conversation

@chjlee1
Copy link

@chjlee1 chjlee1 commented Dec 8, 2025

Description

This PR implements a full-stack audit logging system for Hiring Assignments. Administrators can now track the history of changes made to any applicant's assignment status, including who made the change, when it occurred, and exactly what fields were updated.

Key Features Implemented

  • Database: Created a new academics__hiring__assignment_audit table to store change logs.

  • Backend Service: Updated HiringService.update_hiring_assignment to automatically compare "old" vs. "new" states and generate an audit record for changes to:

    • Status (Draft/Commit/Final)
    • Flagged state
    • Hiring Level
    • Position Number
    • Notes (captures old vs. new text)
    • EPAR & I9 status
  • API: Added GET /api/hiring/assignments/{id}/history endpoint to retrieve logs sorted by most recent.

  • Frontend:

    • Added clickable chips to the Name column in the Hiring Summary table.
    • Implemented AuditLogDialog to display the history in a clean, scrollable modal.
    • Updated CourseHiringCard widget to support the same click-to-view-history behavior.

Testing

  • Backend Tests: Added 5 new test cases in hiring_test.py covering creation of logs, proper formatting of "Old -> New" strings, ordering, and permission checks.
  • Manual Testing: Verified end-to-end flow by logging in as Admin (Rhonda), modifying assignments, and confirming the logs appear correctly in the new dialog.

Video Demo:

Audit.Log.Implementation.Demo.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants