Skip to content

fix: prepare transition payrolls without an employee roster - #2850

Draft
serikjensen wants to merge 2 commits into
mainfrom
transition-investigation
Draft

serikjensen wants to merge 2 commits into
mainfrom
transition-investigation

Conversation

@serikjensen

@serikjensen serikjensen commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What this fixes

When you open a transition payroll, the list of employees showed up empty. You could not see or edit anyone.

Why it happened

To load a payroll, the app calls a step called prepare. For a normal payroll, the app tells prepare which employees to include by sending a list of employee IDs.

A transition payroll is different. Its list of employees is set by the pay schedule change itself. You are not allowed to choose who is on it. So when the app sent a list of IDs, the server rejected the whole call:

Employees cannot be added to a transition payroll; its roster is determined by the pay schedule transition.

Because prepare failed, no employees came back and the screen was empty.

What changed

The app now checks the payroll's type first. If it is a transition payroll, it calls prepare without a list of employee IDs, so the server returns the full roster it already decided on.

This happens in two places:

  • The main payroll edit screen (PayrollConfiguration).
  • The single-employee edit screen (PayrollEditEmployee, and the shared form hook it uses).

Normal (non-transition) payrolls are unchanged. They still send their list of IDs exactly as before.

On the single-employee edit screen, the app used to grab the first person in the returned list. Since a transition payroll returns everyone, it now picks the person you actually clicked by matching their ID. This is safe for normal payrolls too.

How the type is detected

The payroll is read directly (not guessed), and its type is derived from that. This is deterministic, not based on catching an error.

Outstanding work

  • Breadcrumb missing on transition edit-employee screen. The "Edit {employee name}" breadcrumb does not appear when editing an employee on a transition payroll.

  • Overtime workweek breakdown collapses after calculating. Steps to reproduce on a transition payroll with more than one workweek:

    1. Set overtime hours to a different value in each workweek (for example, 10 in one and 5 in the other).
    2. Calculate the payroll.
    3. Go back to editing.
    4. The per-workweek breakdown is gone. Instead of 10 and 5 in separate workweeks, there is one overtime entry of 15.

    The separate workweek values appear to be merged into a single total when you return to editing. Needs investigation.

  • See TRANSITION_PAYROLL_TASKS.md for the open question about whether the manual "create transition payroll" screen is still needed.

Note on CI

The repo build is currently red because of the in-progress API version upgrade (unrelated payPeriod nullable type changes across many payroll files). Those failures are not from this change.

🤖 Generated with Claude Code

serikjensen and others added 2 commits September 25, 2026 15:27
A transition payroll's roster is fixed by the pay-schedule transition, so
the API rejects any employee_uuids sent to prepare. Detect the transition
type from the payroll and omit the roster in that case, on both the payroll
configuration screen and the edit-employee screens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant