Faith Forge LabsPeru

Include the work that was active during the reporting window

A report can omit ongoing work even when every recorded timestamp is correct. Filtering only by the time an activity began answers a different question from asking which activities overlapped the period under review.

This fictional staff-tool case uses a fixed, already agreed reporting window. Its purpose is to inspect membership and the portion shown within that window. It does not redefine the organisation’s calendar, estimate labour effort or alter the original activity history.

State the report’s question

The operations owner wants to see review activities active at any point from 09:00 up to, but not including, 12:00 UTC on 3 November 2026. Both source endpoints and the window are unambiguous instants. Local display labels may be added for readers, but they do not determine this fixture’s membership.

The application stores each completed activity with a start and end. The report should show the intersection of that activity with the chosen window and retain access to the original endpoints. The owner explicitly approves half-open intervals: an activity ending exactly at 09:00 contributes nothing, and one starting exactly at 12:00 belongs outside this report.

The report is about these recorded activity intervals. It does not establish that a person worked continuously, that overlapping tasks represent different staff or that the durations can be billed.

Compare the source with the first result

Activity A-51 began at 08:40 and ended at 09:20. It was active for the first twenty minutes of the report window. The initial query requires the start time to fall within the window, so it excludes A-51 completely.

A-52 began at 10:10 and ended at 10:35; it appears correctly. A-53 began at 11:50 and ended at 12:30; it appears, but the report displays its full forty minutes rather than the ten minutes inside the selected period. The same incorrect model therefore both omits relevant work and includes time outside the question being asked.

Activity Original interval, UTC Portion inside 09:00–12:00
A-51 08:40–09:20 09:00–09:20: 20 minutes
A-52 10:10–10:35 10:10–10:35: 25 minutes
A-53 11:50–12:30 11:50–12:00: 10 minutes
A-54 08:30–09:00 None
A-55 12:00–12:20 None
A-56 08:00–13:00 09:00–12:00: 180 minutes

A-56 is particularly useful evidence. It spans the whole window while starting outside it. No rearrangement of a start-time-only filter can represent that requirement correctly.

Select by overlap, then clip the view

For finite valid intervals in this fixture, an activity overlaps the half-open window when its start is before the window end and its end is after the window start. That identifies A-51, A-52, A-53 and A-56.

The displayed beginning is the later of the activity start and the window start. The displayed end is the earlier of the activity end and the window end. These are report values. The application does not save them over the original activity record.

PostgreSQL’s range documentation distinguishes overlap from intersection and supplies operators for both. A real implementation must use the installed database’s supported types and the agreed endpoint rules; the business meaning does not come from choosing an operator alone.

The owner also defines the scope of this fixture: all six records have known finite endpoints and a valid start-before-end relationship. An open activity or invalid interval needs a separately agreed treatment. It must not quietly acquire a guessed completion time to fit the report.

Inspect the corrected report and source

The isolated result contains exactly four activity identities: A-51, A-52, A-53 and A-56. Their displayed intervals and durations match the table. A-54 and A-55 are absent because their intervals only meet the window at an excluded boundary; neither contributes positive time within it.

Opening A-51’s source record still shows 08:40–09:20. A-53 still ends at 12:30, and A-56 still spans 08:00–13:00. The report labels its clipped columns “Within selected window” so a reader does not mistake them for corrected historical timestamps.

A second review window, 12:00–13:00, includes A-53’s remaining 12:00–12:30 portion, A-55 and A-56. The source records are the same; changing the question changes the view. A-54 remains outside that later period.

A record from an unrelated work group remains excluded under the existing report scope. The overlap repair does not remove organisation or role restrictions from the query.

Explain what the numbers can support

The four displayed intervals may overlap one another. Adding their durations would produce a measure of recorded task time only if the organisation deliberately defines that measure; it would not automatically give unique clock time, staffing capacity or billable hours. This report keeps individual activity contributions visible rather than labelling an unexplained total as productivity.

The completed correction answers the approved question: which recorded activities intersected this window, and which part of each lies within it? It preserves the original history and demonstrates exact edge behaviour. The handover retains the six-record table so future changes can be reviewed against that meaning.

The case-reference tool service can include this kind of reporting review when staff need to inspect work attached to records without altering the evidence those records contain.