Skip to content

Pull purpose 40 UCPath payroll and correct purpose from the faculty portfolio - #154

Merged
rmartinsen-ucd merged 7 commits into
mainfrom
rpm/ucpath-purpose-40
Dec 1, 2026
Merged

rmartinsen-ucd merged 7 commits into
mainfrom
rpm/ucpath-purpose-40

Conversation

@rmartinsen-ucd

Copy link
Copy Markdown
Contributor

Why

Some UCPath payroll arrives on purpose 40 when the project task is really research (44 or 45). AE corrects the purpose when the payroll posts, but the UCPath pull only asked for 13U02, purposes 44, 45, 78 and 204 projects, so the miscoded rows never arrived and their salary, fringe and FTE were missing from the report.

What changed

  • New table data.FacultyPortfolioTaskPurposes and a new import stage "Faculty dept portfolio" that loads project, task and purpose from ae_dwh.ucd_faculty_rpt_t. It runs right after Build projects. Blank purposes are skipped, which is how sponsored projects drop out.
  • The UCPath salary and fringe queries now include purpose 40 and bring in the PPM task from PRODUCT into a new Task column.
  • After the pull, inside the same transaction, each row whose project and task are in the lookup gets the report's purpose. The purpose UCPath sent is kept in a new SourcePurpose column (NULL means unchanged).
  • The UCPath import fails before deleting anything if the lookup is empty.
  • Rows still on 40 are excluded by the existing purpose classification. No view or UI changes.

Decisions

  • Purpose is a task attribute in the report, so the match is on project and task, not project alone.
  • Sponsored projects keep the purpose UCPath sent. The report has no purpose for them.
  • The correction applies to every matching row, not only rows sent as 40.

Things to know before merging

  • Adding 40 grows the salary pull by about a third (about 133,000 rows on top of 375,000).
  • ClassifyTransactions flags AE rows whose account appears anywhere in UCPath. If the purpose 40 rows bring in an account the old pull never had, AE rows on that account become excluded. Worth checking after the first import.
  • The two new columns sit in the middle of UcPathTransactions, so the DACPAC deploy rebuilds that table.
  • The import run now has 14 stages.

Testing

  • Server suite passes (665 tests), including new SQL integration tests for the lookup import, the purpose correction and the empty lookup failure.
  • Not yet run against the real linked servers. Check after the first import: every UCPath row on PPMRC00006 and PPMRC00056 should be on purpose 45.

🤖 Generated with Claude Code

rmartinsen-ucd and others added 5 commits December 1, 2026 10:28
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80ddb746-96b8-4a45-a6b0-de995d664eed
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@rmartinsen-ucd
rmartinsen-ucd marked this pull request as ready for review December 1, 2026 15:46
rmartinsen-ucd and others added 2 commits December 1, 2026 12:54
An empty source used to commit an empty lookup and succeed, so the run
only failed later at the UCPath stage after AE had been replaced. Throw
before the commit so the delete rolls back and the run stops here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@rmartinsen-ucd
rmartinsen-ucd merged commit 1be4fd2 into main Dec 1, 2026
5 checks passed
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.

2 participants