Skip to content

Report PI payroll on FTE line 241 instead of 242 - #136

Merged
rmartinsen-ucd merged 5 commits into
mainfrom
rpm/pi-fte-241-adjustment
Nov 18, 2026
Merged

rmartinsen-ucd merged 5 commits into
mainfrom
rpm/pi-fte-241-adjustment

Conversation

@rmartinsen-ucd

Copy link
Copy Markdown
Contributor

Summary

Last year's process ran sp_Adjust241FTE to move PI payroll from FTE line 242 (Professional Support) to 241 (Scientist). This brings that rule into the app, without the self certify title code list.

  • v_TransactionSfn now reports FTE line 241 when a UCPath row's title puts it on 242 and the employee is the PI on a project in data.Projects
  • The view is the one place the FTE line is derived, so inclusion, the auto-association build and Expense Review all pick it up with no other changes
  • Only 242 moves. Other lines, rows with no FTE line and AE rows are unchanged
  • A PI counts even when their only project is excluded for being under $100. Co-investigators do not count, the same as the 20x and 220 rules
  • Rule 220 only prorates State Appropriations (13U02) payroll on line 241, so a PI on a 242 title can now have that payroll prorated across their projects

PI FTE to 241 tab

A new tab on Auto-Associations, after FTE over 1.0, lists what moved. It is review only, with no action to take.

  • One row per employee and job code, with the title, the line it was on, the line it is on now, expenses, FTE and row count
  • CSV export like the other report tabs
  • Served by GET /api/autoassociations/pi-fte-adjustments

Nothing is stored to mark a moved row. The list is the data.ExpenseSummary rows on line 241 whose title's staff type is on 242. That holds as long as Titles and StaffTypes have not changed since the build.

Notes for review

  • Nothing changes in an environment until its next build. The new tab stays empty and the 220 tab stays as it was until OrgR Review is reopened and completed
  • On local data 145 transactions move, across 6 employees, all on job code 0900 (DIRECTOR). None are on 13U02, so rule 220 results do not change there. The count covers every imported row, not only the included ones
  • The view gains one join to the distinct list of PI employee IDs. A read only probe on 1.79M local transactions returned the same row count and took about 70 ms before and after
  • Estimated plans show the join is dropped when a query does not read the FTE line, as in the Expense Review transaction list. That was checked locally against the new view body, not on a deployed instance

Testing

  • dotnet test app.sln: 612 passed, including new SQL integration tests for the view, the build and the report query
  • npm test in client: 235 passed, with typecheck and lint clean
  • Both ran before List every PI on the PI Appointments tab #131 merged. The branch merges cleanly with current main but the suites have not been rerun on the merged result
  • Not checked signed in through the browser

🤖 Generated with Claude Code

rmartinsen-ucd and others added 4 commits November 13, 2026 12:19
v_TransactionSfn moves a UCPath row from FTE line 242 to 241 when the employee is the PI of record on any project in the cycle project list. This brings back last year's sp_Adjust241FTE without the self certify title code list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GET /api/autoassociations/pi-fte-adjustments lists expense summary rows on FTE line 241 whose title's staff type line is 242, grouped by employee and job code. Review only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A review only tab after FTE over 1.0 lists the PI payroll reported on FTE line 241 instead of 242, by employee and job code, with CSV export.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The list shows a PI's 242 payroll on every fund, so the note no longer says all of it is prorated. Also state the reference data assumption in the report query comment.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 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: d3214c43-e3c4-40b2-a2ef-01aa77b04e66
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@sprucely sprucely left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a possible improvement you could make to the note on the pi-fte tab. Otherwise, looks good.

{
id: 'pi-fte',
label: 'PI FTE to 241',
note: 'PIs whose title puts their payroll on FTE line 242 (Professional Support). It is reported on 241 (Scientist) instead. Any State Appropriations (13U02) payroll they have can then be prorated across their projects. Review only.',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Clarify which payroll qualifies for proration

A PI can appear here for one job while their 13U02 payroll from a second job stays on line 243. A PI whose only project is excluded also appears. The note currently says any 13U02 payroll they have can be prorated. A more precise sentence would be “Rule 220 prorates adjusted 13U02 payroll across the PI’s eligible projects.” Update the route test that asserts the current wording.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 3638cc6. The note now reads "Rule 220 prorates the adjusted State Appropriations (13U02) payroll across the PI's eligible projects." I kept the fund name alongside 13U02 so it still appears for users. The route test asserts the new wording.

The note said any 13U02 payroll a listed PI has can be prorated. A second
job on another FTE line is not prorated, and a PI whose only project is
excluded has no project to prorate across.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@rmartinsen-ucd
rmartinsen-ucd merged commit ff19c62 into main Nov 18, 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