Absent 11 days, charged for 10

One holiday rule lived in twelve places and gave two answers across leave, overtime and a public page. We test the copies against each other.
Case study

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
BetterQA colleagues working on laptops at the meeting table in the Cluj-Napoca office
The numbers
11 vs 10days absent against days charged for one employee
12places that decide whether a calendar entry is a day off
8of them never checked it was confirmed; 2 of those touched money
11 vs 10days absent against days charged, in one leave plan
4more readers found by a second, broader search
At stake

What was at risk

Money

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.

Clients

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.

Compliance

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.

Reputation

A public page showing draft and rejected entries

The public holidays endpoint served draft and admin-rejected rows, with date and title.

Rules

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.

Method

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.

Findings

What we found, and what it costs

Money

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.

Money

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.

Disclosure

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.

Outcome

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 this means for you: When a business rule touches money, count how many places implement it. If the answer is more than one, test them against each other.
Check

What to check in your own product

  1. 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.
  2. Check that public endpoints do not serve draft or rejected entries.Anyone could read dates and titles an admin had not approved.
  3. 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.

Talk to our team
Share the Post: