Repository navigation
Add job SFN and account to reports, and move job code classification to Data Classification - #138
Conversation
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>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Job codes are assigned on the Job Code tab of Data Classification now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Also pin that a rejected rebuild leaves the previous build in place. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Keep FTE on expense summary rows whose dollars net to zero. The build drops a row only when it has neither dollars nor FTE, and the job code gate follows the same rule. Reload job codes after every segment save, cancelling a read that is still running so it cannot stand in for the reload. Cancel running report reads before reloading after a rebuild. Disable Continue during a rebuild and Rebuild during completion. The rebuild state is read by mutation key so it survives leaving the stage. Lock a job code dropdown while its save is running. Stop clearing the Expense Review filter cache when a job code is assigned. A job SFN is not part of the inclusion rule. Forward the abort signal on job code and auto-association reads. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keeps the PI FTE to 241 tab from main. The unmatched job codes tab and its query stay removed, since job code classification now lives in Data Classification. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sprucely
left a comment
There was a problem hiding this comment.
A few more issues were identified...
| JOIN [data].[Titles] ti ON ti.[TitleCode] = e.[JobCode] | ||
| JOIN [data].[StaffTypes] st ON st.[StaffTypeCode] = ti.[StaffTypeCode] | ||
| WHERE e.[FteSfn] = '241' AND st.[FteSfn] = '242' |
There was a problem hiding this comment.
[P2] Preserve the PI adjustment recorded by the build
The report compares the build’s stored FTE line with the job code’s current title mapping. After a build puts a non-PI on line 241, changing that job code to 242 makes the report list the employee as a 242-to-241 PI adjustment. The reverse edit can hide a genuine adjustment. Capture the original title line or adjustment flag during the build and use it to select report rows.
| onSuccess: async () => { | ||
| await queryClient.cancelQueries({ queryKey: ['autoAssociations'] }); | ||
| await queryClient.invalidateQueries({ queryKey: ['autoAssociations'] }); |
There was a problem hiding this comment.
[P2] Prevent exports from using the previous build’s rows
I opened tab 204, switched to 201, rebuilt, and returned to 204 after the new timestamp appeared and Continue was enabled. Export produced a CSV containing the old 204 rows while the replacement request was running. Invalidation retains inactive tabs’ cached data. Key the reports by build ID or discard the previous build’s rows before enabling export.
| export async function reloadJobCodeClassifications(queryClient: QueryClient) { | ||
| await queryClient.cancelQueries({ queryKey: JOB_CODE_CLASSIFICATIONS_KEY }); | ||
| await queryClient.invalidateQueries({ queryKey: JOB_CODE_CLASSIFICATIONS_KEY }); |
There was a problem hiding this comment.
[P3] Keep Continue disabled when a segment save finishes off-page
I classified the last fund, left Data Classification while the save was pending, and returned after it succeeded. The cached Job Code list was empty, so Continue sent the completion request before the refreshed list revealed a blocking code. Remove the inactive cached result after a segment save, or keep Continue disabled until the refreshed list arrives.
| </span> | ||
| <button | ||
| className="btn btn-sm" | ||
| disabled={rebuilding || continueMutation.isPending} |
There was a problem hiding this comment.
[P3] Keep Rebuild disabled across navigation during completion
After clicking Continue, I left Auto-Associations and returned while its completion request was pending. Both buttons were enabled. I could start a rebuild, then the original completion navigated to Manual Associations while that rebuild was still running. Track the completion mutation by key across mounts, as the stage already does for rebuilds.
| {rebuildMutation.isError ? ( | ||
| <div className="alert alert-error" role="alert"> | ||
| <span>{apiErrorMessage(rebuildMutation.error, 'Could not rebuild auto-associations.')}</span> |
There was a problem hiding this comment.
[P3] Show a rejected rebuild after returning to the stage
I started a rebuild, left the stage, and returned before the server rejected it. The Rebuilding indicator cleared and Continue became available with the old timestamp, but the rejection message never appeared. The error display reads the newly mounted mutation observer. Read the latest rebuild outcome from shared mutation state so the reviewer sees the failure.
Summary
data.ExpenseSummaryhas anAccountcolumn andBuildAutoAssociationsgroups by it. There are more summary rows and the dollar totals are unchanged.data.Titles.Changes after review
Notes for review
Accountis the last column ofExpenseSummaryso publishing alters the table in place. It is blank on existing builds until someone clicks Rebuild or completes OrgR Review.ExpenseReviewService.cs,AutoAssociationReportService.cs,autoAssociationsTabs.tsandAutoAssociationsStage.tsx. The unmatched job codes query that Report PI payroll on FTE line 241 instead of 242 #136 edits is gone here. Its replacement is inJobCodeClassificationService.cs.Not handled here
Test plan
GET /api/jobcodeclassificationson a real cycle🤖 Generated with Claude Code