Absent 11 days, charged for 10
A holiday that staff proposed and no admin had confirmed still counted in some parts of the product, and not in others.
For heads of HR technology and engineering at companies that calculate leave, overtime or billable time.
If your product calculates leave, overtime or billable time, that rule is probably written more than once, and the copies may disagree. BetterFlow is a time and leave platform that BetterQA builds and tests. In it, twelve places decided whether a calendar entry is a day off, and they gave two answers: in leave arithmetic, in the overtime ledger and on a public page.
- Workforce, timesheet and leave software
- Time and leave platform built and tested by BetterQA
- Money
- Clients
- Compliance
- Reputation

What was at risk
Leave charged against the wrong number of days
In one leave plan, an unconfirmed holiday inside the window made the employee absent for 11 working days and charged for 10.
Staff credited less overtime than they worked
The recovery ledger discarded overtime. A test now applies 2.0 hours where the old code applied 0.0.
Leave records that disagree with each other
Leave balances and working time are often governed by labour law. Two answers to the same question is an audit problem.
A public page showing draft and rejected entries
The public holidays endpoint served draft and admin-rejected rows, with date and title.
Standards and rules in play
- One rule, one implementationFour implementations already answered approved-only. Eight did not check status. Twelve places, two answers.
- Confirmed means confirmedStaff can propose an entry that an admin has not confirmed. Draft and rejected entries must not count as days off.
Leave and working-time rules are set by labour law and each employer's policy. This page describes testing, not legal advice or an audit.
How we tested it
- Test level
- Component and system integration testing: the holiday rule and every place that reads it, from leave arithmetic to the public API.
- Test types
- Functional; confirmation and regression testing, with a test that failed before the fix covering the public endpoint.
- Test basis
- The rule: only an approved entry is a day off.
- TechniqueDecision table testingEach caller was checked against the entry states: draft, approved and rejected.
- TechniqueStatic testing (code census)The first search looked for the scope's name. A broad search over every holiday query, 22 lines before and after, found four more readers.
Terms as in the ISTQB CTFL 4.0 glossary.
What we found, and what it costs
Leave arithmetic counted an unconfirmed holiday as absence but not as a charge
What it costs you11 days absent, 10 charged: the employee and the books disagree.
The recovery ledger under-credited overtime
What it costs youIt was the opposite of how the issue was first described. Reading the code, not the ticket, found it.
The public holidays page served draft and rejected entries
What it costs youAnyone could read dates and titles an admin had not approved.
Four dead call sites were deleted, and a second, broader search found four more readers the first census had missed.
What changed
Eight live call sites moved to one helper that checks the entry is confirmed, four dead ones were deleted, and a test that failed before the fix covers the public endpoint.
What to check in your own product
- Search broadly before you count the places that decide a rule.A broad search over every holiday query, 22 lines before and after, found four more readers.
- Check that public endpoints do not serve draft or rejected entries.Anyone could read dates and titles an admin had not approved.
- Read the code, not only the ticket.It was the opposite of how the issue was first described.
How many places in your product decide the same business rule?
We find every place a rule lives and test them against each other. The first month is a trial.