Leave requests
A leave request asks for time off in a pay category, such as vacation or sick. It lists the hours for each day.
Approvers decide it in stages, like a timecard. Once it is approved, its hours go on the timecard and come out of the right balance.
Someone can ask ahead of time. For a sick day, they can ask after the fact.
Asking for leave
Section titled “Asking for leave”A request has these parts:
- The category: vacation, sick, bereavement, or any other pay category you’ve set up.
- The days, each with its hours: 8 hours on Monday, 4 on Tuesday. Time and Attendance uses the hours as asked. It does not work them out from the schedule.
- A comment. This part is optional.
The request is recorded with who made it and when.
hourctl -t acme attend leave request 104552 --category vacation --day 2026-10-12=8h --day 2026-10-13=4hTo change a request, make a new one that replaces it
(--replaces <id>). To take a request back, cancel it. Either way, the
original stays on record. A changed request goes through approval again.
Approving leave
Section titled “Approving leave”Leave goes through the stages of your approval rule for leave, such as supervisor and then HR. This works the same way as for timecards. See approvals. Each stage approves, rejects or disputes the request.
Some stages are tied to a hierarchy. Such a stage waits on the person’s organization on the request’s first day, or on one above it. See approval stages tied to a hierarchy.
If you have no approval rule for leave, a request waits for one decision
at the stage approval. No one is paid for leave that nobody decided on.
hourctl -t acme attend leave list 104552hourctl -t acme attend leave decide 104552 v1 approve --stage supervisorWhat approved leave does
Section titled “What approved leave does”- On the timecard. Its hours appear on each day as lines in its pay category. The lines have no clock times. They work like hours entered without punches. Leave is paid and never billed. Use a category that doesn’t count as worked. Then time off doesn’t push anyone into overtime.
- On balances. Some categories draw on an accrual, such as PTO. For those, the approved hours come out of that balance.
- On the schedule. Every request that isn’t cancelled shows on the days it covers, with where it stands. This lets your rules see it. The standard no-show rule does not flag a day of approved leave.
- In future periods. Timecards for future pay periods that have leave in them are worked out too. Upcoming time off shows where it falls.
A request that’s still waiting gives no hours and excuses nothing.
For example, someone is scheduled Monday to Wednesday. They work Monday. They ask for vacation on Tuesday and Wednesday in two requests. The supervisor and then HR approve Tuesday’s request. Wednesday’s request is still waiting for the supervisor.
| Day | Timecard | Why |
|---|---|---|
| Monday | 8.00 work | Worked. |
| Tuesday | 8.00 vacation | Leave approved. |
| Wednesday | No-show | Leave asked for, not yet approved. |
Leave on a public holiday
Section titled “Leave on a public holiday”A day of leave that falls on a public holiday is not a day of leave. The
person is paid the holiday, and nothing comes out of their balance. The
standard step leave_not_on_holidays
does this. The cookbook recipe
leave_on_holidays shows it with the balance
check. A week off with a holiday in it uses up only the other days.
It works the same way when the holiday is added afterwards. Leave that was already approved on that day has its hours put back in the balance. The holiday is paid once.
Suppose the day’s pay period is already closed. The closed period stays as it was paid. The difference is an adjustment in the open period, as with any later change. A request made after that is checked against the balance the person has now.
Some employers still charge the leave that was approved before the holiday was announced. That is the employer’s own rule. The system gives the rule these facts:
- Each holiday says when it was announced. That is when its date was first put in the setup.
- Each request says when it was asked for and when it was approved.
The recipe leave_charged_before_announcement is a short rule written from
these facts. Leave approved before the announcement stays charged. Leave
approved after it draws nothing.
Some holidays are paid differently, such as regular holidays and special
non-working days. You tell them apart as everywhere else. List their ids
(holidays = ["id", ...]) in the rule.
When a holiday is entered after its day
Section titled “When a holiday is entered after its day”A holiday can be entered after the day it falls on. Maybe it was forgotten. Maybe a decree announced it late. What was already worked out for that day then changes:
- Leave on that day comes back to the balance.
- A no-show goes away.
- People who worked that day get the holiday’s premiums.
Nothing changes without a trace:
- Every event sent because of the change says what made it change. This
covers an adjusted timecard, a resolved exception and changed leave. The
event carries this in
because. It names the holiday, who entered it and when, and the reason they gave. Put a reason with the holiday, because the setup API takes one. - Leave whose booked time changes is sent as
leave.booked, with what it booked before. - The standard rule
holiday_entered_afterflags a day that observes a holiday entered after the day ended. The flag is for the approver. See the cookbook recipe of the same name. A person decides whether the holiday was forgotten or announced late. The system gives the facts and a flag. It does not guess. A policy can block approval on the flag.
Leave rules
Section titled “Leave rules”Your policy can check a request before anyone approves it:
| Check | What happens |
|---|---|
| Balance | A request for more time than the person has left is refused. It can’t be approved, whatever anyone decides. Two requests recorded at the same instant are decided one after the other, in the order requests are listed. So together they can’t overdraw a balance. |
| Blackout dates | A request with a day in a blackout period is refused. |
| Notice | A request made too close to its first day is flagged for the approver (leave_short_notice), not refused. |
| Routing | A long request goes to someone else at a stage, such as a director, and the request shows who it’s waiting for. |
Each is a standard business rule of its own:
leave_balance,
leave_blackout,
leave_notice and
leave_route. A policy
lists the ones it wants. The cookbook’s leave
rules recipe shows all four.
Following requests from other systems
Section titled “Following requests from other systems”Other systems can follow requests through leave events. There is an event when a request waits at a stage, so that stage’s approver can act. There is one for a decision and one for a cancellation. The attendance API has the routes for asking, deciding and cancelling.
Leave in other places
Section titled “Leave in other places”Time off can show up in three ways. Each does a different job:
| What it is | |
|---|---|
| A leave request (this page) | Time off someone asked for, approved in stages, that pays its hours once approved. |
| A schedule change of “leave” | Takes the day’s shifts off the schedule. Pays nothing by itself. |
| Hours entered in a leave category | Hours recorded directly, with no request or approval. |